keepme / src /context /AuthContext.tsx
narinder1231's picture
Add AuthContext and AuthProvider for authentication state management
2efe57e
raw
history blame contribute delete
227 Bytes
import { createContext } from "react";
interface AuthContextType {
isAuthenticated: boolean;
login: (token: string) => void;
logout: () => void;
}
export const AuthContext = createContext<AuthContextType | null>(null);