gitscope
← marzneshin / v0.3.0-alpha4 / dashboard/src/routes/_auth/login.tsx
https://dev.kronoz.win/r/marzneshin.git
dashboard/src/routes/_auth/login.tsx · TypeScript
Blame Raw
 1import { Card, CardContent, CardHeader, CardTitle } from '@marzneshin/components';
 2import { LoginForm, useAuth } from '@marzneshin/features/auth';
 3import { createFileRoute } from '@tanstack/react-router'
 4import { FC } from 'react'
 5import { useTranslation } from 'react-i18next';
 6
 7const LoginPage: FC = () => {
 8  const { t } = useTranslation();
 9  const { removeAuthToken } = useAuth()
10  removeAuthToken()
11  return (
12    <div className='flex flex-row justify-center items-center p-4 w-full h-full'>
13      <Card className="p-1 w-full md:w-2/3">
14        <CardHeader>
15          <CardTitle className="font-header text-primary">
16            {t('login')}
17          </CardTitle>
18        </CardHeader>
19        <CardContent>
20          <LoginForm />
21        </CardContent>
22      </Card>
23    </div>
24  );
25};
26
27export const Route = createFileRoute('/_auth/login')({
28  component: () => <LoginPage />
29})