cookies working for some raeson now

This commit is contained in:
ntr committed 2022-08-08 21:36:46 +10:00
1 parent 413aeedadf
commit 65e603f222
4 files changed
+31 -16

No files matched your search

+2 -6
View File
@@ -1,17 +1,13 @@
import { h } from 'preact';
import { useState, useEffect } from 'preact/hooks';
import axios from 'axios';
import actions from './../actions';
const Register = () => {
const [email, setEmail] = useState('')
const [password, setPassword] = useState('');
async function postLogin() {
const { data } = await axios.post(`http://localhost:41337/auth/login`, {
email,
password,
});
console.log(data);
actions.postLogin(email, password);
}
function handleSubmit(e) {