This commit is contained in:
Elijah Lucian
2021-03-16 20:15:33 -06:00
parent 90b00b4736
commit 8a9604966c
35 changed files with 29279 additions and 0 deletions
+8
View File
@@ -0,0 +1,8 @@
import React from 'react'
import { RouteChildrenProps } from 'react-router'
type Props = RouteChildrenProps & {}
export const Dashboard = (_: Props) => {
return <p>a dashboard</p>
}
+31
View File
@@ -0,0 +1,31 @@
import React, { 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>
)
}
+7
View File
@@ -0,0 +1,7 @@
import React from 'react'
type Props = {}
export const Profile = (props: Props) => {
return <p>Look, A user profile!</p>
}