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
travel
Commits
ebaa5d9b
Commit
ebaa5d9b
authored
Jul 08, 2022
by
Yoon, Daeki
😅
Browse files
회원가입 화면 useState 버그 수정
parent
7d95fbba
Changes
1
Show whitespace changes
Inline
Side-by-side
frontend/src/auth/signup.tsx
View file @
ebaa5d9b
import
React
,
{
FormEvent
,
useEffect
,
useState
}
from
"
react
"
;
import
{
Link
,
use
Navigate
}
from
"
react-router-dom
"
;
import
{
Link
,
Navigate
}
from
"
react-router-dom
"
;
import
{
authApi
}
from
"
../apis
"
;
import
{
catchErrors
}
from
"
../helpers
"
;
import
{
SpinnerIcon
}
from
"
../icons
"
;
...
...
@@ -17,7 +17,6 @@ export default function Signup() {
const
[
error
,
setError
]
=
useState
(
""
);
const
[
disabled
,
setDisabled
]
=
useState
(
false
);
const
[
success
,
setSuccess
]
=
useState
(
false
);
const
navigate
=
useNavigate
();
useEffect
(()
=>
{
setDisabled
(
!
(
user
.
name
&&
user
.
email
&&
user
.
password
&&
user
.
password2
));
...
...
@@ -65,7 +64,7 @@ export default function Signup() {
if
(
success
)
{
alert
(
"
회원가입 되었습니다
"
);
n
avigate
(
"
/login
"
,
{
replace
:
true
})
;
return
<
N
avigate
to
=
{
"
/login
"
}
replace
/>
;
}
return
(
...
...
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