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

s

parent b9ae2ea0
import axios from "axios"; import axios from "axios";
import { useEffect, useState } from "react"; import { useEffect, useState } from "react";
import userApi from "../apis/user.api";
const INIT_USER = { const INIT_USER = {
name: "", name: "",
...@@ -38,16 +39,16 @@ const Signup = () => { ...@@ -38,16 +39,16 @@ const Signup = () => {
async function handleSubmit() { async function handleSubmit() {
try { try {
const data = await axios.post("https://localhost:8080/api/room/1/1",user) const data = await userApi.signup(user)
// setLoading(true); setLoading(true);
// setError(""); setError("");
// const success = await login(user.email, user.password); // const success = await login(user.email, user.password);
console.log(data); console.log(data);
setSuccess(success); setSuccess(success);
} catch (error) { } catch (error) {
// catchErrors(error, setError); // catchErrors(error, setError);
} finally { } 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