mirror of
https://github.com/Sonny93/my-links.git
synced 2025-12-10 07:25:35 +00:00
refactor: add new small content layout
This commit is contained in:
@@ -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;
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user