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