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