fix(web): render sidebar on settings route

Settings page was rendering Outlet directly, omitting the Sidebar nav.
Adds a playwright e2e test asserting sidebar visibility on both
dashboard and settings routes.
This commit is contained in:
Offending Commit
2026-05-03 16:58:43 -05:00
parent 784cbee870
commit 557fecf038
6 changed files with 92 additions and 11 deletions

View File

@@ -1,4 +1,4 @@
import { createRootRoute, Outlet, redirect, useRouter } from "@tanstack/react-router";
import { createRootRoute, Outlet, redirect } from "@tanstack/react-router";
import { useEffect } from "react";
import { Sidebar } from "@/components/layout/Sidebar";
import { loadConfig } from "@/lib/config";
@@ -7,17 +7,10 @@ import { applyTheme, getStoredTheme } from "@/lib/theme";
const SETTINGS_PATH = "/settings";
function RootLayout() {
const router = useRouter();
const isSettings = router.state.location.pathname === SETTINGS_PATH;
useEffect(() => {
applyTheme(getStoredTheme());
}, []);
if (isSettings) {
return <Outlet />;
}
return (
<div
className="flex h-screen w-full overflow-hidden"