gitscope
← marzneshin / v0.4.0 / dashboard/src/routes/_dashboard/users.lazy.tsx
https://dev.kronoz.win/r/marzneshin.git
dashboard/src/routes/_dashboard/users.lazy.tsx · TypeScript
Blame Raw
 1import {
 2    Card,
 3    CardContent,
 4    CardFooter,
 5    CardHeader,
 6    CardTitle,
 7    Page,
 8    Loading,
 9} from '@marzneshin/components';
10import { UsersNoServiceAlert, UsersTable } from '@marzneshin/features/users';
11import { createFileRoute, Outlet } from '@tanstack/react-router'
12import { type FC, Suspense } from 'react';
13import { useTranslation } from 'react-i18next';
14
15export const UsersPage: FC = () => {
16    const { t } = useTranslation();
17    return (
18        <Page>
19            <Card className="border-0 sm:w-screen md:w-full">
20                <CardHeader>
21                    <CardTitle>
22                        {t('users')}
23                    </CardTitle>
24                </CardHeader>
25                <CardContent>
26                    <UsersTable />
27                    <Suspense fallback={<Loading />}>
28                        <Outlet />
29                    </Suspense>
30                </CardContent>
31                <CardFooter>
32                    <UsersNoServiceAlert />
33                </CardFooter>
34            </Card>
35        </Page>
36    )
37};
38
39export const Route = createFileRoute('/_dashboard/users')({
40    component: () => <UsersPage />,
41})