mirror of
https://github.com/kremalicious/umami.git
synced 2024-12-24 18:26:20 +01:00
Fixed website undefined issue.
This commit is contained in:
parent
b663146ad5
commit
c567eddff9
@ -9,9 +9,9 @@ export default function RealtimeDetailsPage() {
|
|||||||
const { id: websiteId } = router.query;
|
const { id: websiteId } = router.query;
|
||||||
const { formatMessage, labels } = useMessages();
|
const { formatMessage, labels } = useMessages();
|
||||||
const { get, useQuery } = useApi();
|
const { get, useQuery } = useApi();
|
||||||
const { data: website } = useQuery(['websites', websiteId], () =>
|
const { data: website } = useQuery(['websites', websiteId], () => get(`/websites/${websiteId}`), {
|
||||||
websiteId ? get(`/websites/${websiteId}`, { enabled: !!websiteId }) : null,
|
enabled: !!websiteId,
|
||||||
);
|
});
|
||||||
const title = `${formatMessage(labels.realtime)}${website?.name ? ` - ${website.name}` : ''}`;
|
const title = `${formatMessage(labels.realtime)}${website?.name ? ` - ${website.name}` : ''}`;
|
||||||
|
|
||||||
if (!websiteId) {
|
if (!websiteId) {
|
||||||
|
Loading…
Reference in New Issue
Block a user