diff options
| author | Pinapelz <yukais@pinapelz.com> | 2025-09-03 21:45:38 -0700 |
|---|---|---|
| committer | Pinapelz <yukais@pinapelz.com> | 2025-09-03 21:45:38 -0700 |
| commit | 159cac6460fb2a42456c6f9a44cbcdb03b938823 (patch) | |
| tree | fb39937774a9bdf99f932b2df6bcab433dcfe4bb /frontend/src/contexts | |
| parent | c8bae6ab79a32da0fe745ebb9401e14f86c1f0d8 (diff) | |
implement admin dashboard frontend and handle game creation
Diffstat (limited to 'frontend/src/contexts')
| -rw-r--r-- | frontend/src/contexts/AuthContext.tsx | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/frontend/src/contexts/AuthContext.tsx b/frontend/src/contexts/AuthContext.tsx index 8abeeb4..09e4864 100644 --- a/frontend/src/contexts/AuthContext.tsx +++ b/frontend/src/contexts/AuthContext.tsx @@ -4,9 +4,10 @@ import { authApi } from '../utils/authApi'; import type { User as ApiUser, SessionResponse } from '../utils/authApi'; interface User { - id: string; + id: number; username: string; email: string; + isAdmin: boolean; } interface AuthContextType { @@ -40,9 +41,10 @@ export const AuthProvider: React.FC<AuthProviderProps> = ({ children }) => { const isAuthenticated = user !== null; const transformApiUser = (apiUser: ApiUser): User => ({ - id: apiUser.id.toString(), + id: apiUser.id, username: apiUser.username, email: apiUser.email, + isAdmin: apiUser.isAdmin, }); const checkAuth = async () => { |
