Implement redux.

This commit is contained in:
Mike Cao 2020-08-04 22:45:05 -07:00
parent 9d8a2406e1
commit 5d4ff5cfa4
31 changed files with 341 additions and 85 deletions

View file

@ -20,7 +20,7 @@ export default function Login() {
const [message, setMessage] = useState();
const handleSubmit = async ({ username, password }) => {
const response = await post('/api/auth', { username, password });
const response = await post('/api/auth/login', { username, password });
if (response?.token) {
await Router.push('/');