mirror of
https://github.com/umami-software/umami.git
synced 2026-02-18 11:35:37 +01:00
Refactored website components. New layout.
This commit is contained in:
parent
6e41ba2e2c
commit
06f76dda13
35 changed files with 1159 additions and 987 deletions
|
|
@ -1,6 +1,6 @@
|
|||
import { useEffect } from 'react';
|
||||
import { useRouter } from 'next/navigation';
|
||||
import { Page } from '@/components/common/Page';
|
||||
import { PageBody } from '@/components/common/PageBody';
|
||||
import { SectionHeader } from '@/components/common/SectionHeader';
|
||||
import { useApi, useMessages } from '@/components/hooks';
|
||||
import { EmptyPlaceholder } from '@/components/common/EmptyPlaceholder';
|
||||
|
|
@ -21,11 +21,11 @@ export function RealtimeHome() {
|
|||
}, [data, router]);
|
||||
|
||||
return (
|
||||
<Page isLoading={isLoading || data?.length > 0} error={error}>
|
||||
<PageBody isLoading={isLoading || data?.length > 0} error={error}>
|
||||
<SectionHeader title={formatMessage(labels.realtime)} />
|
||||
{data?.length === 0 && (
|
||||
<EmptyPlaceholder message={formatMessage(messages.noWebsitesConfigured)} />
|
||||
)}
|
||||
</Page>
|
||||
</PageBody>
|
||||
);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
import { firstBy } from 'thenby';
|
||||
import { Grid } from '@umami/react-zen';
|
||||
import { GridRow } from '@/components/common/GridRow';
|
||||
import { Page } from '@/components/common/Page';
|
||||
import { PageBody } from '@/components/common/PageBody';
|
||||
import { Panel } from '@/components/common/Panel';
|
||||
import { RealtimeChart } from '@/components/metrics/RealtimeChart';
|
||||
import { WorldMap } from '@/components/metrics/WorldMap';
|
||||
|
|
@ -17,7 +17,7 @@ export function WebsiteRealtimePage({ websiteId }: { websiteId: string }) {
|
|||
const { data, isLoading, error } = useRealtimeQuery(websiteId);
|
||||
|
||||
if (isLoading || error) {
|
||||
return <Page isLoading={isLoading} error={error} />;
|
||||
return <PageBody isLoading={isLoading} error={error} />;
|
||||
}
|
||||
|
||||
const countries = percentFilter(
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue