MAJOR UPDATE/FEAT: Overhaul of DashboardPage to include VODs;
REFACTOR: General formatting; UPDATE: Shrink Logo upon opening sidebar on certain pages
This commit is contained in:
@@ -1,22 +1,22 @@
|
||||
import { createContext, useContext } from "react";
|
||||
|
||||
interface AuthContextType {
|
||||
isLoggedIn: boolean;
|
||||
username: string | null;
|
||||
userId: number | null;
|
||||
setIsLoggedIn: (value: boolean) => void;
|
||||
setUsername: (value: string | null) => void;
|
||||
setUserId: (value: number | null) => void;
|
||||
isLoggedIn: boolean;
|
||||
username: string | null;
|
||||
userId: number | null;
|
||||
isLive: boolean;
|
||||
setIsLoggedIn: (value: boolean) => void;
|
||||
setUsername: (value: string | null) => void;
|
||||
setUserId: (value: number | null) => void;
|
||||
setIsLive: (value: boolean) => void;
|
||||
}
|
||||
|
||||
export const AuthContext = createContext<AuthContextType | undefined>(
|
||||
undefined
|
||||
);
|
||||
export const AuthContext = createContext<AuthContextType | undefined>(undefined);
|
||||
|
||||
export function useAuth() {
|
||||
const context = useContext(AuthContext);
|
||||
if (context === undefined) {
|
||||
throw new Error("useAuth must be used within an AuthProvider");
|
||||
}
|
||||
return context;
|
||||
const context = useContext(AuthContext);
|
||||
if (context === undefined) {
|
||||
throw new Error("useAuth must be used within an AuthProvider");
|
||||
}
|
||||
return context;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user