mirror of
https://github.com/umami-software/umami.git
synced 2026-02-04 04:37:11 +01:00
Don't render link on share page.
This commit is contained in:
parent
f84e67b0e6
commit
518f0b66c6
2 changed files with 9 additions and 3 deletions
|
|
@ -8,7 +8,13 @@ import { Edit, Share } from '@/components/icons';
|
|||
import { DialogButton } from '@/components/input/DialogButton';
|
||||
import { ActiveUsers } from '@/components/metrics/ActiveUsers';
|
||||
|
||||
export function WebsiteHeader({ showActions }: { showActions?: boolean }) {
|
||||
export function WebsiteHeader({
|
||||
showActions,
|
||||
allowLink = true,
|
||||
}: {
|
||||
showActions?: boolean;
|
||||
allowLink?: boolean;
|
||||
}) {
|
||||
const website = useWebsite();
|
||||
const { renderUrl, pathname } = useNavigation();
|
||||
const isSettings = pathname.endsWith('/settings');
|
||||
|
|
@ -23,7 +29,7 @@ export function WebsiteHeader({ showActions }: { showActions?: boolean }) {
|
|||
<PageHeader
|
||||
title={website.name}
|
||||
icon={<Favicon domain={website.domain} />}
|
||||
titleHref={renderUrl(`/websites/${website.id}`, false)}
|
||||
titleHref={allowLink ? renderUrl(`/websites/${website.id}`, false) : undefined}
|
||||
>
|
||||
<Row alignItems="center" gap="6" wrap="wrap">
|
||||
<ActiveUsers websiteId={website.id} />
|
||||
|
|
|
|||
|
|
@ -33,7 +33,7 @@ export function SharePage({ shareId }) {
|
|||
<PageBody gap>
|
||||
<Header whiteLabel={whiteLabel} />
|
||||
<WebsiteProvider websiteId={shareToken.websiteId}>
|
||||
<WebsiteHeader showActions={false} />
|
||||
<WebsiteHeader showActions={false} allowLink={false} />
|
||||
<WebsitePage websiteId={shareToken.websiteId} />
|
||||
</WebsiteProvider>
|
||||
<Footer whiteLabel={whiteLabel} />
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue