import { Roles } from 'api/userRoles'; import { createContext } from 'react'; export type AuthData = { role: string; isAuth: boolean | null; setRole: (role: string) => void; setIsAuth: (state: boolean | null) => void; }; export const AuthContext = createContext<AuthData>({ role: Roles.visitor, isAuth: false, setRole: () => { // Do nothing }, setIsAuth: () => { // Do nothing }, });