fix(web): render customer portal as full-page layout without admin nav

The /portal route was rendering inside the admin layout wrapper which
added the staff navigation bar and padding, breaking the portal's own
sidebar layout. Now /portal renders independently as a full-page app.

Co-Authored-By: Paperclip <noreply@paperclip.ing>
This commit is contained in:
Groom Book CTO
2026-03-19 02:01:11 +00:00
parent 5757cd0631
commit 5271a6b497
+11 -2
View File
@@ -20,7 +20,7 @@ const NAV_LINKS = [
{ to: "/portal", label: "Customer Portal" },
];
export function App() {
function AdminLayout() {
const location = useLocation();
return (
<div style={{ minHeight: "100vh", fontFamily: "system-ui, sans-serif" }}>
@@ -82,9 +82,18 @@ export function App() {
<Route path="/book" element={<BookPage />} />
<Route path="/group-bookings" element={<GroupBookingPage />} />
<Route path="/reports" element={<ReportsPage />} />
<Route path="/portal" element={<CustomerPortal />} />
</Routes>
</main>
</div>
);
}
export function App() {
const location = useLocation();
if (location.pathname.startsWith("/portal")) {
return <CustomerPortal />;
}
return <AdminLayout />;
}