Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
students
bora-it
Commits
e72932e2
Commit
e72932e2
authored
Jul 27, 2021
by
이재연
Browse files
s
parent
b9ae2ea0
Changes
1
Hide whitespace changes
Inline
Side-by-side
client/src/components/SignUp.js
View file @
e72932e2
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
);
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment