From 739ca6486a0e659ec369ab938f9dec24025f84ca Mon Sep 17 00:00:00 2001 From: Muhammad Ibrahim Date: Sun, 21 Sep 2025 22:37:53 +0100 Subject: [PATCH] Fix React error #301 --- frontend/src/contexts/AuthContext.jsx | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/frontend/src/contexts/AuthContext.jsx b/frontend/src/contexts/AuthContext.jsx index a20c393..6bda081 100644 --- a/frontend/src/contexts/AuthContext.jsx +++ b/frontend/src/contexts/AuthContext.jsx @@ -17,10 +17,6 @@ export const AuthProvider = ({ children }) => { const [isLoading, setIsLoading] = useState(true) const [permissionsLoading, setPermissionsLoading] = useState(false) const [needsFirstTimeSetup, setNeedsFirstTimeSetup] = useState(false) - - // TEMPORARY DEBUG: Force admin setup for testing - // Remove this line after debugging - setNeedsFirstTimeSetup(true) const [checkingSetup, setCheckingSetup] = useState(true) // Initialize auth state from localStorage @@ -236,7 +232,9 @@ export const AuthProvider = ({ children }) => { if (response.ok) { const data = await response.json() console.log('Admin check response:', data) // Debug log - setNeedsFirstTimeSetup(!data.hasAdminUsers) + // TEMPORARY DEBUG: Force admin setup for testing + // setNeedsFirstTimeSetup(!data.hasAdminUsers) + setNeedsFirstTimeSetup(true) // Force setup for testing } else { console.log('Admin check failed:', response.status, response.statusText) // Debug log // If endpoint doesn't exist or fails, assume setup is needed