import { createContext, useContext, useState } from "react"; export interface UserAuthenticationContextProps { isAuthenticated: boolean; setIsAuthenticated: React.Dispatch>; } export const UserAuthenticationContext = createContext({ isAuthenticated: false, setIsAuthenticated: () => {}, }); export const UserAuthenticationContextProvider = ({ children }: { children: React.ReactNode }) => { const [isAuthenticated, setIsAuthenticated] = useState(false); return ( {children} ); }; export const useUserAuthenticationContext = () => { return useContext(UserAuthenticationContext); };