refactor: use persistant layout

This commit is contained in:
Sonny
2024-05-27 00:28:36 +02:00
committed by Sonny
parent e03952de1c
commit 76847ff76b
9 changed files with 169 additions and 142 deletions

View File

@@ -1,12 +1,13 @@
import { Link } from '@inertiajs/react';
import { route } from '@izzyjs/route/client';
import { ReactNode } from 'react';
import { Trans, useTranslation } from 'react-i18next';
import LegalContentLayout from '~/components/layouts/legal_content_layout';
export default function TermsPage() {
function TermsPage() {
const { t } = useTranslation('terms');
return (
<LegalContentLayout>
<>
<h1>{t('title')}</h1>
<p>{t('edited_at', { date: '19/11/2023' })}</p>
<p>{t('welcome')}</p>
@@ -48,6 +49,9 @@ export default function TermsPage() {
<h2>{t('cancel.title')}</h2>
<p>{t('cancel.description')}</p>
</LegalContentLayout>
</>
);
}
TermsPage.layout = (page: ReactNode) => <LegalContentLayout children={page} />;
export default TermsPage;