From a51ab4ade82677a7b2fcd81c70dbf5997a0039ca Mon Sep 17 00:00:00 2001 From: Aravind Date: Mon, 17 Aug 2026 20:58:23 +0530 Subject: [PATCH] Revert the public /LandingPage route Rolls src/App.jsx back to 3c649fc, so every route including /LandingPage sits behind the Base44 auth gate again. Reverts: 015da4e Render the landing page without a Base44 session Completes the rollback of the public-without-login routes; the blank-page fix in 3c649fc is left in place, since that is what makes the deploy render at all. Co-Authored-By: Claude Opus 5 --- src/App.jsx | 32 ++++++++------------------------ 1 file changed, 8 insertions(+), 24 deletions(-) diff --git a/src/App.jsx b/src/App.jsx index 301773a..b52371d 100644 --- a/src/App.jsx +++ b/src/App.jsx @@ -50,34 +50,10 @@ const LayoutWrapper = ({ children, currentPageName }) => Layout ? {children} : <>{children}; -// Routes that render for anyone, signed in or not. LandingPage is pure marketing -// markup — it reads no entities and never touches useAuth — so the only thing the -// auth gate ever did for it was bounce visitors to a Google login before they -// could read what the product is. Its CTAs point at /Dashboard, which is still -// gated, so signing in stays one click away. -const PUBLIC_ROUTES = new Set(['/LandingPage']); - -const isPublicRoute = (pathname) => { - // Tolerate a trailing slash so /LandingPage/ isn't quietly sent to login. - const normalized = pathname.length > 1 ? pathname.replace(/\/+$/, '') : pathname; - return PUBLIC_ROUTES.has(normalized); -}; - const AuthenticatedApp = () => { const { isLoadingAuth, isLoadingPublicSettings, authError, isAuthenticated, navigateToLogin } = useAuth(); const location = useLocation(); - // Ahead of both gates below. The spinner would stall this page on a network - // round-trip it has no use for, and the auth gate would redirect away from it — - // either one defeats the point of a public page. - if (isPublicRoute(location.pathname)) { - return ( - - } /> - - ); - } - // Show loading spinner while checking app public settings or auth if (isLoadingPublicSettings || isLoadingAuth) { return ( @@ -116,6 +92,14 @@ const AuthenticatedApp = () => { // Render the main app + if (location.pathname === '/LandingPage') { + return ( + + } /> + + ); + } + return (