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:
+11
-2
@@ -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 />;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user