fix: correct default sidebar state initialization and adjust sidebar width

This commit is contained in:
Roberto Musso
2026-02-20 12:34:23 +01:00
parent 8c1fb54afd
commit 3f1208f5ad
2 changed files with 3 additions and 2 deletions

View File

@@ -45,8 +45,9 @@ export function AppShell({ children }: AppShellProps) {
const currentPath = routerState.location.pathname;
// Controlled open state (spec: "Controlled Sidebar" pattern)
// Default to collapsed (false) until the persisted preference loads
const [open, setOpen] = useState(() =>
collapsedQuery.data === undefined ? true : !collapsedQuery.data
collapsedQuery.data === undefined ? false : !collapsedQuery.data
);
const handleOpenChange = (value: boolean) => {