Add contentComponents to the main layout

Return button is not inside of the header.
This commit is contained in:
ajnart
2023-08-14 10:15:12 +02:00
parent b249c0205f
commit ce5552c913
6 changed files with 31 additions and 13 deletions

View File

@@ -134,7 +134,19 @@ export default function CustomizationPage() {
})} • Homarr`;
return (
<MainLayout>
<MainLayout
contentComponents={
<Button
component={Link}
passHref
href={backToBoardHref}
variant="light"
leftIcon={<IconArrowLeft size={16} />}
>
{t('backToBoard')}
</Button>
}
>
<Head>
<title>{metaTitle}</title>
</Head>
@@ -191,14 +203,6 @@ export default function CustomizationPage() {
name: firstUpperCase(query.slug),
})}
</Title>
<Button
component={Link}
href={backToBoardHref}
variant="light"
leftIcon={<IconArrowLeft size={16} />}
>
{t('backToBoard')}
</Button>
</Group>
<BoardCustomizationFormProvider form={form}>
<Stack spacing="xl">

View File

@@ -10,6 +10,7 @@ import {
Title,
} from '@mantine/core';
import { createFormContext } from '@mantine/form';
import { IconArrowLeft } from '@tabler/icons-react';
import { GetServerSideProps } from 'next';
import { useTranslation } from 'next-i18next';
import Head from 'next/head';
@@ -33,7 +34,14 @@ const PreferencesPage = () => {
const headTitle = `${t('metaTitle')} • Homarr`;
return (
<MainLayout showExperimental>
<MainLayout
showExperimental
contentComponents={
<Button component="a" href="/board/" variant="light" leftIcon={<IconArrowLeft size={16} />}>
{t('common:back')}
</Button>
}
>
<Container>
<Paper p="xl" mih="100%" withBorder>
<Head>