forked from polka_billy/porridger
Code styling changes
This commit is contained in:
@ -1,9 +1,9 @@
|
||||
import { FormEventHandler } from 'react'
|
||||
import { Card, Tabs, Tab } from "react-bootstrap"
|
||||
import { useNavigate } from "react-router-dom";
|
||||
import { Card, Tabs, Tab } from 'react-bootstrap'
|
||||
import { useNavigate } from 'react-router-dom';
|
||||
|
||||
import { useAuth } from "../hooks/api";
|
||||
import { setToken } from "../utils/auth";
|
||||
import { useAuth } from '../hooks/api';
|
||||
import { setToken } from '../utils/auth';
|
||||
import { AuthForm } from '../components';
|
||||
|
||||
function LoginPage() {
|
||||
@ -24,22 +24,22 @@ function LoginPage() {
|
||||
password: formData.get('password') as string
|
||||
}
|
||||
|
||||
const token = import.meta.env.PROD ? await doAuth(data, newAccount) : "a"
|
||||
const token = import.meta.env.PROD ? await doAuth(data, newAccount) : 'a'
|
||||
|
||||
if (token) {
|
||||
setToken(token)
|
||||
navigate("/")
|
||||
navigate('/')
|
||||
}
|
||||
}
|
||||
|
||||
return (
|
||||
<Card className="m-4">
|
||||
<Card className='m-4'>
|
||||
<Card.Body>
|
||||
<Tabs defaultActiveKey="register" fill justify className="mb-3">
|
||||
<Tab eventKey="register" title="Регистрация">
|
||||
<Tabs defaultActiveKey='register' fill justify className='mb-3'>
|
||||
<Tab eventKey='register' title='Регистрация'>
|
||||
<AuthForm handleAuth={handleAuth(true)} register={true} loading={loading} error={error} />
|
||||
</Tab>
|
||||
<Tab eventKey="login" title="Вход">
|
||||
<Tab eventKey='login' title='Вход'>
|
||||
<AuthForm handleAuth={handleAuth(false)} register={false} loading={loading} error={error} />
|
||||
</Tab>
|
||||
</Tabs>
|
||||
@ -48,4 +48,4 @@ function LoginPage() {
|
||||
)
|
||||
}
|
||||
|
||||
export default LoginPage
|
||||
export default LoginPage
|
||||
|
Reference in New Issue
Block a user