From 97ae74742d055f662234866b2573cc59e0b36169 Mon Sep 17 00:00:00 2001 From: B SIMAK AHMED <1NZ24CS030@newhorizonindia.edu> Date: Thu, 19 Nov 2026 17:33:13 +0530 Subject: [PATCH 1/6] feat: redesign maintenance mode page --- src/components/MaintenanceGate.tsx | 109 ++++++++++++++++++++++++----- 1 file changed, 93 insertions(+), 16 deletions(-) diff --git a/src/components/MaintenanceGate.tsx b/src/components/MaintenanceGate.tsx index ae59673..9bc77a5 100644 --- a/src/components/MaintenanceGate.tsx +++ b/src/components/MaintenanceGate.tsx @@ -7,7 +7,7 @@ import { supabase } from "@/integrations/supabase/client"; const MAINTENANCE_SETTING_KEY = "site.maintenance_mode"; function isAdminOrAuthPath(pathname: string) { - return /^\/(?:auth|mfa-setup|mfa-verify|forgot-password|reset-password|dashboard|admin)(?:\/|$)/.test( + return /^\\/(?:auth|mfa-setup|mfa-verify|forgot-password|reset-password|dashboard|admin)(?:\\/|$)/.test( pathname, ); } @@ -31,27 +31,104 @@ export function MaintenanceGate({ children }: { children: ReactNode }) { retry: 1, }); - // Render the site immediately; maintenance status resolves asynchronously. - // If maintenance is enabled, the existing maintenance screen replaces the site - // as soon as the background check confirms it. + // Keep the existing site available while the maintenance setting is checked. + // Admin and authentication routes continue to bypass the maintenance screen. if (bypass || maintenance.isError || maintenance.isLoading || !maintenance.data) { return children; } return ( -
-
-
-