fix(public): always show real hero; drop nav from landing page
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:
@@ -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 />} />
|
||||||
|
|||||||
@@ -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
|
||||||
|
|||||||
Reference in New Issue
Block a user