Commit e72932e2 authored by 이재연's avatar 이재연
Browse files

s

parent b9ae2ea0
import axios from "axios";
import { useEffect, useState } from "react";
import userApi from "../apis/user.api";
const INIT_USER = {
name: "",
......@@ -38,16 +39,16 @@ const Signup = () => {
async function handleSubmit() {
try {
const data = await axios.post("https://localhost:8080/api/room/1/1",user)
// setLoading(true);
// setError("");
const data = await userApi.signup(user)
setLoading(true);
setError("");
// const success = await login(user.email, user.password);
console.log(data);
setSuccess(success);
} catch (error) {
// catchErrors(error, setError);
} finally {
// setLoading(false);
setLoading(false);
}
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment