gitscope
← marzneshin / v0.3.0-alpha8 / dashboard/src/routes/_dashboard/nodes.tsx
https://dev.kronoz.win/r/marzneshin.git
dashboard/src/routes/_dashboard/nodes.tsx · TypeScript
Blame Raw
 1import {
 2  Alert,
 3  AlertDescription,
 4  AlertTitle,
 5  Card,
 6  CardContent,
 7  CardFooter,
 8  CardHeader,
 9  CardTitle,
10  Page
11} from '@marzneshin/components';
12import { NodesTable } from '@marzneshin/features/nodes';
13import { Link, createFileRoute } from '@tanstack/react-router'
14import { Info } from 'lucide-react';
15import { FC } from 'react';
16import { useTranslation } from 'react-i18next';
17
18export const NodesPage: FC = () => {
19  const { t } = useTranslation();
20  return (
21    <Page>
22      <Card className="sm:w-screen md:w-full">
23        <CardHeader>
24          <CardTitle>
25            {t('nodes')}
26          </CardTitle>
27        </CardHeader>
28        <CardContent>
29          <NodesTable />
30        </CardContent>
31        <CardFooter>
32          <Alert>
33            <Info className="mr-2" />
34            <AlertTitle className="font-semibold text-primary">{t('page.nodes.certificate-alert.title')}</AlertTitle>
35            <AlertDescription>
36              {t('page.nodes.certificate-alert.desc')}
37              <Link className="m-1 font-semibold text-secondary-foreground" to="/settings">{t('page.nodes.certificate-alert.click')}</Link>
38            </AlertDescription>
39          </Alert>
40        </CardFooter>
41      </Card >
42    </Page>
43  )
44};
45
46export const Route = createFileRoute('/_dashboard/nodes')({
47  component: () => <NodesPage />
48})