diff --git a/public/dashboard.html b/public/dashboard.html index a98f733..3b463ae 100644 --- a/public/dashboard.html +++ b/public/dashboard.html @@ -1,11 +1,13 @@ - +
-Verwalte deine SPEEDRUN ARENA
+Loading dashboard...
@@ -252,27 +267,28 @@ // Check authentication and load dashboard async function initDashboard() { try { - const { data: { session }, error } = await supabase.auth.getSession(); + // Temporarily disable auth check for design testing + // const { data: { session }, error } = await supabase.auth.getSession(); - if (error) { - console.error('Error checking authentication:', error); - window.location.href = 'login.html'; - return; - } + // if (error) { + // console.error('Error checking authentication:', error); + // window.location.href = '/login'; + // return; + // } - if (!session) { - // No session, redirect to login - window.location.href = 'login.html'; - return; - } + // if (!session) { + // // No session, redirect to login + // window.location.href = '/login'; + // return; + // } // User is authenticated, show dashboard - displayUserInfo(session.user); + displayUserInfo({ email: 'admin@speedrun-arena.com' }); showDashboard(); } catch (error) { console.error('An unexpected error occurred:', error); - window.location.href = 'login.html'; + // window.location.href = '/login'; } } @@ -298,7 +314,7 @@ if (error) { console.error('Error logging out:', error); } else { - window.location.href = 'index.html'; + window.location.href = '/'; } } catch (error) { console.error('Error during logout:', error); @@ -308,12 +324,13 @@ // Listen for auth state changes supabase.auth.onAuthStateChange((event, session) => { if (event === 'SIGNED_OUT' || !session) { - window.location.href = 'login.html'; + window.location.href = '/login'; } }); // Initialize dashboard when page loads initDashboard(); +