mirror of
https://github.com/umami-software/umami.git
synced 2026-02-08 14:47:14 +01:00
Fix website nav menu for mobile. Fixes #2141.
This commit is contained in:
parent
f35d0f65dc
commit
69c0fa0db9
2 changed files with 31 additions and 5 deletions
|
|
@ -4,9 +4,9 @@ import Link from 'next/link';
|
|||
import { useRouter } from 'next/router';
|
||||
import Favicon from 'components/common/Favicon';
|
||||
import ActiveUsers from 'components/metrics/ActiveUsers';
|
||||
import styles from './WebsiteHeader.module.css';
|
||||
import Icons from 'components/icons';
|
||||
import { useMessages, useWebsite } from 'hooks';
|
||||
import styles from './WebsiteHeader.module.css';
|
||||
|
||||
export function WebsiteHeader({ websiteId, showLinks = true, children }) {
|
||||
const { formatMessage, labels } = useMessages();
|
||||
|
|
@ -46,7 +46,7 @@ export function WebsiteHeader({ websiteId, showLinks = true, children }) {
|
|||
</Column>
|
||||
<Column className={styles.actions} variant="two">
|
||||
{showLinks && (
|
||||
<Flexbox alignItems="center">
|
||||
<div className={styles.links}>
|
||||
{links.map(({ label, icon, path }) => {
|
||||
const selected = path ? pathname.endsWith(path) : pathname === '/websites/[id]';
|
||||
|
||||
|
|
@ -58,13 +58,13 @@ export function WebsiteHeader({ websiteId, showLinks = true, children }) {
|
|||
[styles.selected]: selected,
|
||||
})}
|
||||
>
|
||||
<Icon>{icon}</Icon>
|
||||
<Text>{label}</Text>
|
||||
<Icon className={styles.icon}>{icon}</Icon>
|
||||
<Text className={styles.label}>{label}</Text>
|
||||
</Button>
|
||||
</Link>
|
||||
);
|
||||
})}
|
||||
</Flexbox>
|
||||
</div>
|
||||
)}
|
||||
{children}
|
||||
</Column>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue