fix(public): always show real hero; drop nav from landing page
All checks were successful
PR Checks / server-tests (pull_request) Successful in 9m43s
PR Checks / client-build (pull_request) Successful in 9m39s
PR Checks / bot-install (pull_request) Successful in 9m40s

Bug 1 — Logged-out visitors saw the coming-soon Maintenance page while
admins saw the real hero. That difference is produced client-side by
MaintenanceGate (site_mode=maintenance && no user). Pull the `/` hero
route out from behind the gate so every visitor always lands on the real
Portal hero; the MaintenanceGate stays on all other public routes, so
content pages remain gated during maintenance and admins still preview
through it.

Bug 2 — The landing hero rendered the site nav because Portal used
PublicLayout with the default header=true. Pass header={false} so the
hero has no top nav (footer retained), using the layout's existing
escape hatch.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0114TpmrNW4wNXsHq5CR72jQ
This commit is contained in:
2026-07-14 22:57:49 -05:00
parent c31553aeb6
commit 5b6b63e1bc
2 changed files with 7 additions and 3 deletions

View File

@@ -60,7 +60,12 @@ export default function App() {
<AuthProvider> <AuthProvider>
<SiteProvider> <SiteProvider>
<Routes> <Routes>
{/* Public site — gated by maintenance mode (admins preview through it) */} {/* Landing hero — always public, even in maintenance mode. The hero is
itself the pre-launch "coming soon" page, so it sits outside the
MaintenanceGate and every visitor sees it regardless of auth/site mode. */}
<Route path="/" element={<Portal />} />
{/* Rest of the public site — gated by maintenance mode (admins preview through it) */}
<Route <Route
element={ element={
<MaintenanceGate> <MaintenanceGate>
@@ -68,7 +73,6 @@ export default function App() {
</MaintenanceGate> </MaintenanceGate>
} }
> >
<Route path="/" element={<Portal />} />
<Route path="/site" element={<Website />} /> <Route path="/site" element={<Website />} />
<Route path="/site/news" element={<News />} /> <Route path="/site/news" element={<News />} />
<Route path="/site/screenshots" element={<Screenshots />} /> <Route path="/site/screenshots" element={<Screenshots />} />

View File

@@ -40,7 +40,7 @@ export default function Portal() {
const elements = [...layout.elements].sort((a, b) => (a.z || 0) - (b.z || 0)) const elements = [...layout.elements].sort((a, b) => (a.z || 0) - (b.z || 0))
return ( return (
<PublicLayout> <PublicLayout header={false}>
<main style={{ minHeight: '100vh', display: 'flex', flexDirection: 'column' }}> <main style={{ minHeight: '100vh', display: 'flex', flexDirection: 'column' }}>
{PREVIEW && draft && ( {PREVIEW && draft && (
<div <div