From 6aff6dbedc11cef571c0dc6efc9739cd751e7190 Mon Sep 17 00:00:00 2001 From: Meier Lukas Date: Sat, 5 Aug 2023 16:34:38 +0200 Subject: [PATCH] =?UTF-8?q?=E2=99=BB=EF=B8=8F=20Fix=20head=20title=20for?= =?UTF-8?q?=20preferences=20page?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/layout/Templates/MainLayout.tsx | 6 +++--- src/components/layout/header/Header.tsx | 2 +- src/pages/user/preferences.tsx | 5 +++-- 3 files changed, 7 insertions(+), 6 deletions(-) diff --git a/src/components/layout/Templates/MainLayout.tsx b/src/components/layout/Templates/MainLayout.tsx index e3a8c3af0..ac59e1825 100644 --- a/src/components/layout/Templates/MainLayout.tsx +++ b/src/components/layout/Templates/MainLayout.tsx @@ -1,13 +1,13 @@ import { AppShell, useMantineTheme } from '@mantine/core'; - import { MainHeader } from '~/components/layout/header/Header'; type MainLayoutProps = { + showExperimental?: boolean; headerActions?: React.ReactNode; children: React.ReactNode; }; -export const MainLayout = ({ headerActions, children }: MainLayoutProps) => { +export const MainLayout = ({ showExperimental, headerActions, children }: MainLayoutProps) => { const theme = useMantineTheme(); return ( @@ -17,7 +17,7 @@ export const MainLayout = ({ headerActions, children }: MainLayoutProps) => { background: theme.colorScheme === 'dark' ? theme.colors.dark[6] : theme.colors.gray[1], }, }} - header={} + header={} className="dashboard-app-shell" > {children} diff --git a/src/components/layout/header/Header.tsx b/src/components/layout/header/Header.tsx index f4dfad8c9..74bb4586f 100644 --- a/src/components/layout/header/Header.tsx +++ b/src/components/layout/header/Header.tsx @@ -73,7 +73,7 @@ type ExperimentalHeaderNoteProps = { visible?: boolean; }; const ExperimentalHeaderNote = ({ visible = false, height = 30 }: ExperimentalHeaderNoteProps) => { - const { t } = useTranslation(); + const { t } = useTranslation('layout/header'); if (!visible) return null; return ( diff --git a/src/pages/user/preferences.tsx b/src/pages/user/preferences.tsx index 66011697e..08eb89528 100644 --- a/src/pages/user/preferences.tsx +++ b/src/pages/user/preferences.tsx @@ -30,13 +30,14 @@ const PreferencesPage = () => { const { data } = api.user.withSettings.useQuery(); const { data: boardsData } = api.boards.all.useQuery(); const { t } = useTranslation('user/preferences'); + const headTitle = `${t('metaTitle')} • Homarr`; return ( - + - {t('metaTitle')} • Homarr + {headTitle} {t('pageTitle')}