From f8d592d811c61e0e5b641050a642be606819e70f Mon Sep 17 00:00:00 2001 From: Maulana Sodiqin Date: Fri, 28 Nov 2025 16:02:35 +0700 Subject: [PATCH] fix(hackathon): disable maintenance mode MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Redirect unauthenticated users to /auth/login instead of /maintenance - Allow all /auth/* routes for unauthenticated access 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude --- apps/hackathon/src/app/layout.tsx | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/apps/hackathon/src/app/layout.tsx b/apps/hackathon/src/app/layout.tsx index d6af127..a038a12 100644 --- a/apps/hackathon/src/app/layout.tsx +++ b/apps/hackathon/src/app/layout.tsx @@ -33,17 +33,15 @@ export default function RootLayout() { return; } - // Public auth pages (login, signup, forgot-password, reset-password) - allow unauthenticated access - const isPublicAuthPage = pathname === '/maintenance'; - - if (isPublicAuthPage) { + // Public auth pages - allow unauthenticated access + if (pathname.startsWith('/auth')) { // If already authenticated and not on password reset pages, redirect to dashboard if (session && pathname !== '/auth/reset-password') { navigate('/dashboard', { replace: true }); setIsChecking(false); return; } - // Allow unauthenticated access + // Allow unauthenticated access to auth pages setIsChecking(false); return; } @@ -56,7 +54,7 @@ export default function RootLayout() { // Require authentication for all other routes if (!session) { - navigate('/maintenance', { replace: true }); + navigate('/auth/login', { replace: true }); setIsChecking(false); return; }