From 159cac6460fb2a42456c6f9a44cbcdb03b938823 Mon Sep 17 00:00:00 2001
From: Pinapelz <yukais@pinapelz.com>
Date: Wed, 3 Sep 2025 21:45:38 -0700
Subject: implement admin dashboard frontend and handle game creation

---
 frontend/src/contexts/AuthContext.tsx | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

(limited to 'frontend/src/contexts/AuthContext.tsx')

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 () => {
-- 
cgit v1.2.3

