15 lines
382 B
TypeScript
Executable File
15 lines
382 B
TypeScript
Executable File
import { createContext } from "react";
|
|
import User from "./../../interfaces/user.interface"
|
|
|
|
export interface AuthContextType {
|
|
user: User | null;
|
|
loading: boolean;
|
|
update: () => void;
|
|
login: (email: string, password: string) => Promise<{ status: number }>;
|
|
logout: () => Promise<void>;
|
|
}
|
|
|
|
|
|
export const AuthContext = createContext<AuthContextType | null>(null);
|
|
|