client/src/routes/+layout.ts (view raw)
1 2 3 4 5 6 7 8 9 10 11
import type { LayoutLoad } from './$types'; const nonDashboardRoutes = ['/login']; export const load: LayoutLoad = ({ url }) => { const showSidebar = !nonDashboardRoutes.some((route) => url.pathname.startsWith(route)); return { showSidebar }; };