Fix missing back button in WebsiteNav by defaulting sidenav-collapsed state to false.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
Mike Cao 2026-02-06 05:01:11 -08:00
parent ce8c108fac
commit b9eb5f9800

View file

@ -23,7 +23,7 @@ import { Logo } from '@/components/svg';
export function SideNav(props: any) {
const { formatMessage, labels } = useMessages();
const { pathname, renderUrl, websiteId, router } = useNavigation();
const [isCollapsed, setIsCollapsed] = useGlobalState('sidenav-collapsed');
const [isCollapsed, setIsCollapsed] = useGlobalState('sidenav-collapsed', false);
const hasNav = !!(websiteId || pathname.startsWith('/admin') || pathname.includes('/settings'));
@ -135,7 +135,7 @@ export function SideNav(props: any) {
}
const PanelButton = (props: ButtonProps) => {
const [isCollapsed, setIsCollapsed] = useGlobalState('sidenav-collapsed');
const [isCollapsed, setIsCollapsed] = useGlobalState('sidenav-collapsed', false);
return (
<Button
onPress={() => setIsCollapsed(!isCollapsed)}