fix: correct default sidebar state initialization and adjust sidebar width
This commit is contained in:
@@ -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) => {
|
||||
|
||||
Reference in New Issue
Block a user