mirror of
https://github.com/Sonny93/my-links.git
synced 2025-12-09 23:15:36 +00:00
feat: update default layout
This commit is contained in:
@@ -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;
|
||||
|
||||
@@ -7,7 +7,6 @@
|
||||
font-family:
|
||||
Greycliff CF,
|
||||
var(--mantine-font-family);
|
||||
font-weight: 900;
|
||||
margin-bottom: var(--mantine-spacing-md);
|
||||
text-align: center;
|
||||
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user