mirror of
https://github.com/kremalicious/umami.git
synced 2024-12-24 02:06:19 +01:00
Hide links on share page.
This commit is contained in:
parent
80d3bf6ab3
commit
5eea66aa53
@ -1,4 +1,5 @@
|
||||
import { Loading } from 'react-basics';
|
||||
import { useRouter } from 'next/router';
|
||||
import Page from 'components/layout/Page';
|
||||
import WebsiteChart from 'components/pages/websites/WebsiteChart';
|
||||
import FilterTags from 'components/metrics/FilterTags';
|
||||
@ -11,6 +12,8 @@ import { WebsiteMetricsBar } from './WebsiteMetricsBar';
|
||||
|
||||
export default function WebsiteDetailsPage({ websiteId }) {
|
||||
const { data: website, isLoading, error } = useWebsite(websiteId);
|
||||
const { pathname } = useRouter();
|
||||
const showLinks = !pathname.includes('/share/');
|
||||
|
||||
const {
|
||||
query: { view, url, referrer, os, browser, device, country, region, city, title },
|
||||
@ -18,7 +21,7 @@ export default function WebsiteDetailsPage({ websiteId }) {
|
||||
|
||||
return (
|
||||
<Page loading={isLoading} error={error}>
|
||||
<WebsiteHeader websiteId={websiteId} />
|
||||
<WebsiteHeader websiteId={websiteId} showLinks={showLinks} />
|
||||
<WebsiteMetricsBar websiteId={websiteId} sticky={true} />
|
||||
<WebsiteChart websiteId={websiteId} />
|
||||
<FilterTags
|
||||
|
@ -10,7 +10,7 @@ import { useMessages, useWebsite } from 'hooks';
|
||||
|
||||
export function WebsiteHeader({ websiteId, showLinks = true, children }) {
|
||||
const { formatMessage, labels } = useMessages();
|
||||
const { asPath, pathname } = useRouter();
|
||||
const { pathname } = useRouter();
|
||||
const { data: website } = useWebsite(websiteId);
|
||||
const { name, domain } = website || {};
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user