From 36c35f320ddbf96f0830d178662588a3eea754a7 Mon Sep 17 00:00:00 2001
From: B SIMAK AHMED <1NZ24CS030@newhorizonindia.edu>
Date: Tue, 13 Oct 2026 18:27:53 +0530
Subject: [PATCH] Improve initial load with background maintenance check
---
src/components/MaintenanceGate.tsx | 13 +++++--------
1 file changed, 5 insertions(+), 8 deletions(-)
diff --git a/src/components/MaintenanceGate.tsx b/src/components/MaintenanceGate.tsx
index a0db7ab..ae59673 100644
--- a/src/components/MaintenanceGate.tsx
+++ b/src/components/MaintenanceGate.tsx
@@ -31,15 +31,12 @@ export function MaintenanceGate({ children }: { children: ReactNode }) {
retry: 1,
});
- if (bypass || maintenance.isError) return children;
- if (maintenance.isLoading) {
- return (
-
- Checking CodeForge status…
-
- );
+ // 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.
+ if (bypass || maintenance.isError || maintenance.isLoading || !maintenance.data) {
+ return children;
}
- if (!maintenance.data) return children;
return (