mirror of
https://github.com/umami-software/umami.git
synced 2026-02-19 12:05:41 +01:00
DEV :: hide some details
This commit is contained in:
parent
f855786e24
commit
243e2cfba7
3 changed files with 2 additions and 18 deletions
|
|
@ -12,21 +12,20 @@ import WebsiteTableView from './WebsiteTableView';
|
||||||
|
|
||||||
export default function WebsiteDetails({ websiteId }: { websiteId: string }) {
|
export default function WebsiteDetails({ websiteId }: { websiteId: string }) {
|
||||||
const { data: website, isLoading, error } = useWebsite(websiteId);
|
const { data: website, isLoading, error } = useWebsite(websiteId);
|
||||||
const pathname = usePathname();
|
|
||||||
const { query } = useNavigation();
|
const { query } = useNavigation();
|
||||||
|
|
||||||
if (isLoading || error) {
|
if (isLoading || error) {
|
||||||
return <Page isLoading={isLoading} error={error} />;
|
return <Page isLoading={isLoading} error={error} />;
|
||||||
}
|
}
|
||||||
|
|
||||||
const showLinks = !pathname.includes('/share/');
|
const showLinks = false
|
||||||
const { view, ...params } = query;
|
const { view, ...params } = query;
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<WebsiteHeader websiteId={websiteId} showLinks={showLinks} />
|
<WebsiteHeader websiteId={websiteId} showLinks={showLinks} />
|
||||||
<FilterTags websiteId={websiteId} params={params} />
|
<FilterTags websiteId={websiteId} params={params} />
|
||||||
<WebsiteMetricsBar websiteId={websiteId} sticky={true} />
|
<WebsiteMetricsBar websiteId={websiteId} sticky={false} />
|
||||||
<WebsiteChart websiteId={websiteId} />
|
<WebsiteChart websiteId={websiteId} />
|
||||||
{!website && <Loading icon="dots" style={{ minHeight: 300 }} />}
|
{!website && <Loading icon="dots" style={{ minHeight: 300 }} />}
|
||||||
{website && (
|
{website && (
|
||||||
|
|
|
||||||
|
|
@ -1,24 +1,11 @@
|
||||||
import { Icon, Text } from 'react-basics';
|
|
||||||
import Link from 'next/link';
|
|
||||||
import LanguageButton from 'components/input/LanguageButton';
|
import LanguageButton from 'components/input/LanguageButton';
|
||||||
import ThemeButton from 'components/input/ThemeButton';
|
|
||||||
import SettingsButton from 'components/input/SettingsButton';
|
import SettingsButton from 'components/input/SettingsButton';
|
||||||
import Icons from 'components/icons';
|
|
||||||
import styles from './Header.module.css';
|
import styles from './Header.module.css';
|
||||||
|
|
||||||
export function Header() {
|
export function Header() {
|
||||||
return (
|
return (
|
||||||
<header className={styles.header}>
|
<header className={styles.header}>
|
||||||
<div>
|
|
||||||
<Link href="https://umami.is" target="_blank" className={styles.title}>
|
|
||||||
<Icon size="lg">
|
|
||||||
<Icons.Logo />
|
|
||||||
</Icon>
|
|
||||||
<Text>umami</Text>
|
|
||||||
</Link>
|
|
||||||
</div>
|
|
||||||
<div className={styles.buttons}>
|
<div className={styles.buttons}>
|
||||||
<ThemeButton />
|
|
||||||
<LanguageButton />
|
<LanguageButton />
|
||||||
<SettingsButton />
|
<SettingsButton />
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
|
|
@ -3,7 +3,6 @@ import WebsiteDetails from 'app/(main)/websites/[websiteId]/WebsiteDetails';
|
||||||
import { useShareToken } from 'components/hooks';
|
import { useShareToken } from 'components/hooks';
|
||||||
import Page from 'components/layout/Page';
|
import Page from 'components/layout/Page';
|
||||||
import Header from './Header';
|
import Header from './Header';
|
||||||
import Footer from './Footer';
|
|
||||||
import styles from './SharePage.module.css';
|
import styles from './SharePage.module.css';
|
||||||
|
|
||||||
export default function SharePage({ shareId }) {
|
export default function SharePage({ shareId }) {
|
||||||
|
|
@ -18,7 +17,6 @@ export default function SharePage({ shareId }) {
|
||||||
<Page>
|
<Page>
|
||||||
<Header />
|
<Header />
|
||||||
<WebsiteDetails websiteId={shareToken.websiteId} />
|
<WebsiteDetails websiteId={shareToken.websiteId} />
|
||||||
<Footer />
|
|
||||||
</Page>
|
</Page>
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue