mirror of
https://github.com/umami-software/umami.git
synced 2026-02-14 17:45:38 +01:00
add page titles
This commit is contained in:
parent
b39ef68372
commit
3039ad9315
12 changed files with 39 additions and 12 deletions
|
|
@ -1,17 +1,23 @@
|
|||
import { useRouter } from 'next/router';
|
||||
import AppLayout from 'components/layout/AppLayout';
|
||||
import RealtimeDashboard from 'components/pages/realtime/RealtimeDashboard';
|
||||
import useMessages from 'hooks/useMessages';
|
||||
import useApi from 'hooks/useApi';
|
||||
|
||||
export default function RealtimeDetailsPage() {
|
||||
const router = useRouter();
|
||||
const { id: websiteId } = router.query;
|
||||
const { formatMessage, labels } = useMessages();
|
||||
const { get, useQuery } = useApi();
|
||||
const { data: website } = useQuery(['websites', websiteId], () => get(`/websites/${websiteId}`));
|
||||
const title = formatMessage(labels.realtime) + ' | ' + website?.name;
|
||||
|
||||
if (!websiteId) {
|
||||
return null;
|
||||
}
|
||||
|
||||
return (
|
||||
<AppLayout>
|
||||
<AppLayout title={title}>
|
||||
<RealtimeDashboard key={websiteId} websiteId={websiteId} />
|
||||
</AppLayout>
|
||||
);
|
||||
|
|
|
|||
|
|
@ -1,9 +1,11 @@
|
|||
import AppLayout from 'components/layout/AppLayout';
|
||||
import RealtimeHome from 'components/pages/realtime/RealtimeHome';
|
||||
import useMessages from 'hooks/useMessages';
|
||||
|
||||
export default function RealtimePage() {
|
||||
const { formatMessage, labels } = useMessages();
|
||||
return (
|
||||
<AppLayout>
|
||||
<AppLayout title={formatMessage(labels.realtime)}>
|
||||
<RealtimeHome />
|
||||
</AppLayout>
|
||||
);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue