import { createContext, useContext, useState } from "react"; const AuthContext = createContext(); export function AuthProvider({ children }) { const [isAuthenticated, setIsAuthenticated] = useState(false); const login = () => { setIsAuthenticated(true); }; const logout = () => { setIsAuthenticated(false); }; return ( {children} ); } export function useAuth() { return useContext(AuthContext); }