THE COLOR OF MONEY
This commit is contained in:
@@ -1,17 +1,20 @@
|
||||
import { Button, Form, Input } from 'antd'
|
||||
import { Input } from 'antd'
|
||||
import FormItem from 'antd/lib/form/FormItem'
|
||||
import { Link } from 'react-router-dom'
|
||||
import { User } from '../../types'
|
||||
|
||||
import './style.scss'
|
||||
import { useUserContext } from '../../contexts/UserContext'
|
||||
import { Form } from '../../elements/Form'
|
||||
import { Button } from '../../elements/Button'
|
||||
import { useForm } from 'antd/lib/form/Form'
|
||||
|
||||
type FormValues = Pick<User, 'name'> & { password: string }
|
||||
|
||||
export const Login = () => {
|
||||
const userContext = useUserContext()
|
||||
|
||||
const [form] = Form.useForm<FormValues>()
|
||||
const [form] = useForm<FormValues>()
|
||||
|
||||
const handleFinish = ({ name, password }: FormValues) => {
|
||||
userContext.handleLogin(name, password)
|
||||
|
||||
@@ -2,8 +2,7 @@
|
||||
display: flex;
|
||||
box-shadow: 5px 5px #111, 2px 2px #111;
|
||||
flex-direction: column;
|
||||
margin: auto;
|
||||
background: #222;
|
||||
margin: 0 auto;
|
||||
border-radius: 0.2rem;
|
||||
padding: 2rem 2rem;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user