Patch: Tidy up of style code and fix to authentication logic
Feat: Added ability to access user's username through AuthContext
This commit is contained in:
@@ -2,7 +2,9 @@ import { createContext, useContext } from "react";
|
||||
|
||||
interface AuthContextType {
|
||||
isLoggedIn: boolean;
|
||||
username: string | null;
|
||||
setIsLoggedIn: (value: boolean) => void;
|
||||
setUsername: (value: string | null) => void;
|
||||
}
|
||||
|
||||
export const AuthContext = createContext<AuthContextType | undefined>(
|
||||
|
||||
Reference in New Issue
Block a user