mirror of
https://github.com/umami-software/umami.git
synced 2026-02-12 08:37:13 +01:00
Fixed nav display.
This commit is contained in:
parent
2f7f8911cd
commit
25f96f6b6b
5 changed files with 30 additions and 32 deletions
|
|
@ -9,7 +9,7 @@ import { PanelButton } from '@/components/input/PanelButton';
|
|||
|
||||
export function TopNav() {
|
||||
const { teamId, websiteId, pathname } = useNavigation();
|
||||
const isSettings = pathname.includes('/settings');
|
||||
const isWebsite = websiteId && !pathname.includes('/settings');
|
||||
|
||||
return (
|
||||
<Row
|
||||
|
|
@ -24,21 +24,19 @@ export function TopNav() {
|
|||
zIndex={1}
|
||||
>
|
||||
<Row alignItems="center">
|
||||
<PanelButton />
|
||||
<PanelButton isDisabled={!!isWebsite} />
|
||||
<Seperator />
|
||||
<Row alignItems="center" gap="1">
|
||||
<TeamsButton />
|
||||
{websiteId && !isSettings && (
|
||||
<>
|
||||
<Seperator />
|
||||
<WebsiteSelect
|
||||
buttonProps={{ variant: 'quiet' }}
|
||||
websiteId={websiteId}
|
||||
teamId={teamId}
|
||||
/>
|
||||
</>
|
||||
)}
|
||||
</Row>
|
||||
<TeamsButton />
|
||||
{isWebsite && (
|
||||
<>
|
||||
<Seperator />
|
||||
<WebsiteSelect
|
||||
buttonProps={{ variant: 'quiet' }}
|
||||
websiteId={websiteId}
|
||||
teamId={teamId}
|
||||
/>
|
||||
</>
|
||||
)}
|
||||
</Row>
|
||||
<Row alignItems="center" justifyContent="flex-end">
|
||||
<ThemeButton />
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue