feat: update default layout

This commit is contained in:
Sonny
2025-08-06 19:50:53 +02:00
parent d56bd1ef80
commit 97ba56b1e7
36 changed files with 627 additions and 119 deletions

View File

@@ -1,15 +1,8 @@
import { ReactNode } from 'react';
import {
UsersTable,
UsersTableProps,
} from '~/components/admin/users/users_table';
import { ContentLayout } from '~/layouts/content_layout';
function AdminDashboardPage(props: UsersTableProps) {
export default function AdminDashboardPage(props: UsersTableProps) {
return <UsersTable {...props} />;
}
AdminDashboardPage.layout = (page: ReactNode) => (
<ContentLayout children={page} />
);
export default AdminDashboardPage;

View File

@@ -7,7 +7,6 @@
font-family:
Greycliff CF,
var(--mantine-font-family);
font-weight: 900;
margin-bottom: var(--mantine-spacing-md);
text-align: center;

View File

@@ -1,11 +1,9 @@
import { Container, Text, Title } from '@mantine/core';
import { ReactNode } from 'react';
import { useTranslation } from 'react-i18next';
import { FeatureList } from '~/components/home/feature_list';
import classes from './home.module.css';
import { ContentLayout } from '~/layouts/content_layout';
function HomePage() {
export default function HomePage() {
const { t } = useTranslation('about');
return (
<Container className={classes.wrapper}>
@@ -21,6 +19,3 @@ function HomePage() {
</Container>
);
}
HomePage.layout = (page: ReactNode) => <ContentLayout children={page} />;
export default HomePage;

View File

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

View File

@@ -1,8 +1,7 @@
import { Flex, Text } from '@mantine/core';
import { ReactNode, useEffect } from 'react';
import { useEffect } from 'react';
import { useTranslation } from 'react-i18next';
import { LinkList } from '~/components/dashboard/link/list/link_list';
import { ContentLayout } from '~/layouts/content_layout';
import { useCollectionsSetter } from '~/stores/collection_store';
import type { CollectionWithLinks, PublicUser } from '~/types/app';
@@ -10,7 +9,7 @@ interface SharedPageProps {
collection: CollectionWithLinks & { author: PublicUser };
}
function SharedPage({ collection }: SharedPageProps) {
export default function SharedPage({ collection }: SharedPageProps) {
const { t } = useTranslation('common');
const { setActiveCollection } = useCollectionsSetter();
@@ -43,6 +42,3 @@ function SharedPage({ collection }: SharedPageProps) {
</>
);
}
SharedPage.layout = (page: ReactNode) => <ContentLayout>{page}</ContentLayout>;
export default SharedPage;

View File

@@ -1,10 +1,8 @@
import { Link } from '@inertiajs/react';
import { route } from '@izzyjs/route/client';
import { ReactNode } from 'react';
import { Trans, useTranslation } from 'react-i18next';
import { ContentLayout } from '~/layouts/content_layout';
function TermsPage() {
export default function TermsPage() {
const { t } = useTranslation('terms');
return (
<>
@@ -52,6 +50,3 @@ function TermsPage() {
</>
);
}
TermsPage.layout = (page: ReactNode) => <ContentLayout children={page} />;
export default TermsPage;