mirror of
https://github.com/umami-software/umami.git
synced 2026-02-15 10:05:36 +01:00
Fixed sidenav rendering.
This commit is contained in:
parent
8897c2508d
commit
a97445fb82
9 changed files with 95 additions and 21 deletions
|
|
@ -23,7 +23,7 @@ import { PanelButton } from '@/components/input/PanelButton';
|
|||
export function SideNav(props: SidebarProps) {
|
||||
const { formatMessage, labels } = useMessages();
|
||||
const { pathname, renderUrl, websiteId } = useNavigation();
|
||||
const [isCollapsed] = useGlobalState('sidenav-collapsed');
|
||||
let [isCollapsed] = useGlobalState('sidenav-collapsed');
|
||||
|
||||
const hasNav = !!(
|
||||
websiteId ||
|
||||
|
|
@ -32,19 +32,23 @@ export function SideNav(props: SidebarProps) {
|
|||
pathname.endsWith('/settings')
|
||||
);
|
||||
|
||||
if (hasNav) {
|
||||
isCollapsed = true;
|
||||
}
|
||||
|
||||
const links = [
|
||||
{
|
||||
id: 'websites',
|
||||
label: formatMessage(labels.websites),
|
||||
path: '/websites',
|
||||
icon: <Globe />,
|
||||
},
|
||||
{
|
||||
id: 'boards',
|
||||
label: formatMessage(labels.boards),
|
||||
path: '/boards',
|
||||
icon: <LayoutDashboard />,
|
||||
},
|
||||
{
|
||||
id: 'websites',
|
||||
label: formatMessage(labels.websites),
|
||||
path: '/websites',
|
||||
icon: <Globe />,
|
||||
},
|
||||
{
|
||||
id: 'links',
|
||||
label: formatMessage(labels.links),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue