mirror of
https://github.com/ajnart/homarr.git
synced 2025-11-10 23:45:48 +01:00
♻️ Fix head title for preferences page
This commit is contained in:
@@ -1,13 +1,13 @@
|
|||||||
import { AppShell, useMantineTheme } from '@mantine/core';
|
import { AppShell, useMantineTheme } from '@mantine/core';
|
||||||
|
|
||||||
import { MainHeader } from '~/components/layout/header/Header';
|
import { MainHeader } from '~/components/layout/header/Header';
|
||||||
|
|
||||||
type MainLayoutProps = {
|
type MainLayoutProps = {
|
||||||
|
showExperimental?: boolean;
|
||||||
headerActions?: React.ReactNode;
|
headerActions?: React.ReactNode;
|
||||||
children: React.ReactNode;
|
children: React.ReactNode;
|
||||||
};
|
};
|
||||||
|
|
||||||
export const MainLayout = ({ headerActions, children }: MainLayoutProps) => {
|
export const MainLayout = ({ showExperimental, headerActions, children }: MainLayoutProps) => {
|
||||||
const theme = useMantineTheme();
|
const theme = useMantineTheme();
|
||||||
|
|
||||||
return (
|
return (
|
||||||
@@ -17,7 +17,7 @@ export const MainLayout = ({ headerActions, children }: MainLayoutProps) => {
|
|||||||
background: theme.colorScheme === 'dark' ? theme.colors.dark[6] : theme.colors.gray[1],
|
background: theme.colorScheme === 'dark' ? theme.colors.dark[6] : theme.colors.gray[1],
|
||||||
},
|
},
|
||||||
}}
|
}}
|
||||||
header={<MainHeader headerActions={headerActions} />}
|
header={<MainHeader headerActions={headerActions} showExperimental={showExperimental} />}
|
||||||
className="dashboard-app-shell"
|
className="dashboard-app-shell"
|
||||||
>
|
>
|
||||||
{children}
|
{children}
|
||||||
|
|||||||
@@ -73,7 +73,7 @@ type ExperimentalHeaderNoteProps = {
|
|||||||
visible?: boolean;
|
visible?: boolean;
|
||||||
};
|
};
|
||||||
const ExperimentalHeaderNote = ({ visible = false, height = 30 }: ExperimentalHeaderNoteProps) => {
|
const ExperimentalHeaderNote = ({ visible = false, height = 30 }: ExperimentalHeaderNoteProps) => {
|
||||||
const { t } = useTranslation();
|
const { t } = useTranslation('layout/header');
|
||||||
if (!visible) return null;
|
if (!visible) return null;
|
||||||
|
|
||||||
return (
|
return (
|
||||||
|
|||||||
@@ -30,13 +30,14 @@ const PreferencesPage = () => {
|
|||||||
const { data } = api.user.withSettings.useQuery();
|
const { data } = api.user.withSettings.useQuery();
|
||||||
const { data: boardsData } = api.boards.all.useQuery();
|
const { data: boardsData } = api.boards.all.useQuery();
|
||||||
const { t } = useTranslation('user/preferences');
|
const { t } = useTranslation('user/preferences');
|
||||||
|
const headTitle = `${t('metaTitle')} • Homarr`;
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<MainLayout>
|
<MainLayout showExperimental>
|
||||||
<Container>
|
<Container>
|
||||||
<Paper p="xl" mih="100%" withBorder>
|
<Paper p="xl" mih="100%" withBorder>
|
||||||
<Head>
|
<Head>
|
||||||
<title>{t('metaTitle')} • Homarr</title>
|
<title>{headTitle}</title>
|
||||||
</Head>
|
</Head>
|
||||||
<Title mb="xl">{t('pageTitle')}</Title>
|
<Title mb="xl">{t('pageTitle')}</Title>
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user