🐢
This commit is contained in:
@@ -1,3 +0,0 @@
|
||||
export const Dashboard = () => {
|
||||
return <p>a dashboard</p>
|
||||
}
|
||||
@@ -1,31 +0,0 @@
|
||||
import { FormEvent, useState } from 'react'
|
||||
import { useUserContext } from '../contexts/UserContext'
|
||||
|
||||
export const Login = () => {
|
||||
const { handleLogin } = useUserContext()
|
||||
|
||||
const [username, setUsername] = useState('')
|
||||
const [password, setPassword] = useState('')
|
||||
|
||||
const handleSubmit = (e: FormEvent) => {
|
||||
e.preventDefault()
|
||||
|
||||
handleLogin(username, password)
|
||||
}
|
||||
|
||||
return (
|
||||
<form onSubmit={handleSubmit}>
|
||||
<input
|
||||
onChange={(e) => setUsername(e.target.value)}
|
||||
type="text"
|
||||
value={username}
|
||||
/>
|
||||
<input
|
||||
onChange={(e) => setPassword(e.target.value)}
|
||||
type="text"
|
||||
value={password}
|
||||
/>
|
||||
<button type="submit">Login!</button>
|
||||
</form>
|
||||
)
|
||||
}
|
||||
@@ -1,3 +0,0 @@
|
||||
export const Profile = () => {
|
||||
return <p>Look, A user profile!</p>
|
||||
}
|
||||
@@ -1,14 +0,0 @@
|
||||
import { Form, Input, Layout } from 'antd'
|
||||
import { User } from '../../types'
|
||||
|
||||
export const NewUser = () => {
|
||||
const [form] = Form.useForm<User>()
|
||||
|
||||
return (
|
||||
<Form form={form}>
|
||||
<Form.Item label="username" name="name">
|
||||
<Input></Input>
|
||||
</Form.Item>
|
||||
</Form>
|
||||
)
|
||||
}
|
||||
Reference in New Issue
Block a user