diff --git a/pages/404.js b/pages/404.js index a5601f35..4a5f4bd9 100644 --- a/pages/404.js +++ b/pages/404.js @@ -6,7 +6,7 @@ export default function Custom404() { const { formatMessage, labels } = useMessages(); return ( - + diff --git a/pages/dashboard/index.js b/pages/dashboard/index.js index 61377313..061697f4 100644 --- a/pages/dashboard/index.js +++ b/pages/dashboard/index.js @@ -1,9 +1,12 @@ import AppLayout from 'components/layout/AppLayout'; import Dashboard from 'components/pages/dashboard/Dashboard'; +import useMessages from 'hooks/useMessages'; export default function DashboardPage() { + const { formatMessage, labels } = useMessages(); + return ( - + ); diff --git a/pages/realtime/[id]/index.js b/pages/realtime/[id]/index.js index 1eabda32..1cc826ee 100644 --- a/pages/realtime/[id]/index.js +++ b/pages/realtime/[id]/index.js @@ -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 ( - + ); diff --git a/pages/realtime/index.js b/pages/realtime/index.js index fa0d86d6..bb016173 100644 --- a/pages/realtime/index.js +++ b/pages/realtime/index.js @@ -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 ( - + ); diff --git a/pages/settings/profile/index.js b/pages/settings/profile/index.js index ccbff02b..c7dd7d6c 100644 --- a/pages/settings/profile/index.js +++ b/pages/settings/profile/index.js @@ -1,10 +1,12 @@ import AppLayout from 'components/layout/AppLayout'; import SettingsLayout from 'components/layout/SettingsLayout'; import ProfileSettings from 'components/pages/settings/profile/ProfileSettings'; +import useMessages from 'hooks/useMessages'; export default function ProfilePage() { + const { formatMessage, labels } = useMessages(); return ( - + diff --git a/pages/settings/teams/[id]/index.js b/pages/settings/teams/[id]/index.js index 9d5477bc..400d5735 100644 --- a/pages/settings/teams/[id]/index.js +++ b/pages/settings/teams/[id]/index.js @@ -2,17 +2,19 @@ import AppLayout from 'components/layout/AppLayout'; import SettingsLayout from 'components/layout/SettingsLayout'; import TeamSettings from 'components/pages/settings/teams/TeamSettings'; import { useRouter } from 'next/router'; +import useMessages from 'hooks/useMessages'; export default function TeamDetailPage({ disabled }) { const router = useRouter(); const { id } = router.query; + const { formatMessage, labels } = useMessages(); if (!id || disabled) { return null; } return ( - + diff --git a/pages/settings/teams/index.js b/pages/settings/teams/index.js index 2020a05e..c2304ab0 100644 --- a/pages/settings/teams/index.js +++ b/pages/settings/teams/index.js @@ -1,14 +1,16 @@ import AppLayout from 'components/layout/AppLayout'; import SettingsLayout from 'components/layout/SettingsLayout'; import TeamsList from 'components/pages/settings/teams/TeamsList'; +import useMessages from 'hooks/useMessages'; export default function TeamsPage({ disabled }) { + const { formatMessage, labels } = useMessages(); if (disabled) { return null; } return ( - + diff --git a/pages/settings/users/[id]/index.js b/pages/settings/users/[id]/index.js index 48b8218d..b25d5295 100644 --- a/pages/settings/users/[id]/index.js +++ b/pages/settings/users/[id]/index.js @@ -2,17 +2,19 @@ import AppLayout from 'components/layout/AppLayout'; import SettingsLayout from 'components/layout/SettingsLayout'; import UserSettings from 'components/pages/settings/users/UserSettings'; import { useRouter } from 'next/router'; +import useMessages from 'hooks/useMessages'; export default function TeamDetailPage({ disabled }) { const router = useRouter(); const { id } = router.query; + const { formatMessage, labels } = useMessages(); if (!id || disabled) { return null; } return ( - + diff --git a/pages/settings/users/index.js b/pages/settings/users/index.js index 54c07fed..5dbb6966 100644 --- a/pages/settings/users/index.js +++ b/pages/settings/users/index.js @@ -1,14 +1,16 @@ import AppLayout from 'components/layout/AppLayout'; import SettingsLayout from 'components/layout/SettingsLayout'; import UsersList from 'components/pages/settings/users/UsersList'; +import useMessages from 'hooks/useMessages'; export default function UsersPage({ disabled }) { + const { formatMessage, labels } = useMessages(); if (disabled) { return null; } return ( - + diff --git a/pages/settings/websites/[id]/index.js b/pages/settings/websites/[id]/index.js index 1e6f0521..63afbf81 100644 --- a/pages/settings/websites/[id]/index.js +++ b/pages/settings/websites/[id]/index.js @@ -2,17 +2,19 @@ import AppLayout from 'components/layout/AppLayout'; import { useRouter } from 'next/router'; import WebsiteSettings from 'components/pages/settings/websites/WebsiteSettings'; import SettingsLayout from 'components/layout/SettingsLayout'; +import useMessages from 'hooks/useMessages'; export default function WebsiteSettingsPage({ disabled }) { const router = useRouter(); const { id } = router.query; + const { formatMessage, labels } = useMessages(); if (!id || disabled) { return null; } return ( - + diff --git a/pages/settings/websites/index.js b/pages/settings/websites/index.js index 54ad4780..4599e793 100644 --- a/pages/settings/websites/index.js +++ b/pages/settings/websites/index.js @@ -1,14 +1,16 @@ import AppLayout from 'components/layout/AppLayout'; import SettingsLayout from 'components/layout/SettingsLayout'; import WebsitesList from 'components/pages/settings/websites/WebsitesList'; +import useMessages from 'hooks/useMessages'; export default function WebsitesPage({ disabled }) { + const { formatMessage, labels } = useMessages(); if (disabled) { return null; } return ( - + diff --git a/pages/websites/[id]/index.js b/pages/websites/[id]/index.js index 85b2f130..d2a258e1 100644 --- a/pages/websites/[id]/index.js +++ b/pages/websites/[id]/index.js @@ -1,8 +1,10 @@ import { useRouter } from 'next/router'; import AppLayout from 'components/layout/AppLayout'; import WebsiteDetails from 'components/pages/websites/WebsiteDetails'; +import useMessages from 'hooks/useMessages'; export default function DetailsPage() { + const { formatMessage, labels } = useMessages(); const router = useRouter(); const { id } = router.query; @@ -11,7 +13,7 @@ export default function DetailsPage() { } return ( - + );