Skip to content

armgit / umami

Public Imported from GitHub
0

Umami is a privacy-first web and product analytics platform. Traffic, campaigns, behavior, conversions, and revenue in one place. No cookies, no surveillance, self-hosted or in the cloud.

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

Mike Caob9eb5f9800ec
diff --git a/src/app/(main)/SideNav.tsx b/src/app/(main)/SideNav.tsx
index bd143924e..ca52135e4 100644
--- a/src/app/(main)/SideNav.tsx
+++ b/src/app/(main)/SideNav.tsx
@@ -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)}