refactor: add new small content layout

This commit is contained in:
Sonny
2025-08-21 15:44:29 +02:00
parent 44c187acaf
commit c2a1d06008
6 changed files with 74 additions and 91 deletions

View File

@@ -1,6 +1,7 @@
import { useTranslation } from 'react-i18next';
import SmallContentLayout from '~/layouts/small_content';
export default function PrivacyPage() {
function PrivacyPage() {
const { t } = useTranslation('privacy');
return (
<>
@@ -41,3 +42,8 @@ export default function PrivacyPage() {
</>
);
}
PrivacyPage.layout = (page: React.ReactNode) => (
<SmallContentLayout>{page}</SmallContentLayout>
);
export default PrivacyPage;

View File

@@ -1,8 +1,9 @@
import { Link } from '@inertiajs/react';
import { route } from '@izzyjs/route/client';
import { Trans, useTranslation } from 'react-i18next';
import SmallContentLayout from '~/layouts/small_content';
export default function TermsPage() {
function TermsPage() {
const { t } = useTranslation('terms');
return (
<>
@@ -28,7 +29,7 @@ export default function TermsPage() {
<p>
<Trans
i18nKey="personal_data.collect.description"
components={{ a: <Link href={route('privacy').url} /> }}
components={{ a: <Link href={route('privacy').path} /> }}
/>
</p>
@@ -50,3 +51,8 @@ export default function TermsPage() {
</>
);
}
TermsPage.layout = (page: React.ReactNode) => (
<SmallContentLayout>{page}</SmallContentLayout>
);
export default TermsPage;