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