Files
SAE-BUT2-frontend/src/contexts/Auth/AuthContext.ts
T
2026-07-15 18:52:21 +02:00

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);