Update index.js

This commit is contained in:
Ammar 2023-05-11 17:27:37 +01:00 committed by GitHub
parent 586529a5ca
commit 97f4a3bccc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -10,7 +10,7 @@ export default function RealtimeDetailsPage() {
const { formatMessage, labels } = useMessages();
const { get, useQuery } = useApi();
const { data: website } = useQuery(['websites', websiteId], () =>
get(`/websites/${websiteId}`, { enabled: !!websiteId }),
websiteId ? get(`/websites/${websiteId}`, { enabled: !!websiteId }) : null,
);
const title = `${formatMessage(labels.realtime)}${website?.name ? ` - ${website.name}` : ''}`;