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
3611461a
Commit
3611461a
authored
Jul 07, 2021
by
Kim, Chaerin
Browse files
disabled 수정
parent
655aefd3
Changes
1
Show whitespace changes
Inline
Side-by-side
client/src/components/SignUp.js
View file @
3611461a
...
@@ -13,17 +13,19 @@ const INIT_USER = {
...
@@ -13,17 +13,19 @@ const INIT_USER = {
const
Signup
=
()
=>
{
const
Signup
=
()
=>
{
const
[
user
,
setUser
]
=
useState
(
INIT_USER
);
const
[
user
,
setUser
]
=
useState
(
INIT_USER
);
const
[
error
,
setError
]
=
useState
(
""
);
const
[
error
,
setError
]
=
useState
(
""
);
const
[
disabled
,
setDisabled
]
=
useState
(
false
);
const
[
success
,
setSuccess
]
=
useState
(
false
);
const
[
success
,
setSuccess
]
=
useState
(
false
);
let
disabled
=
false
;
useEffect
(()
=>
{
useEffect
(()
=>
{
disabled
=
!
(
setDisabled
(
!
(
user
.
name
&&
user
.
name
&&
user
.
idNumber1
&&
user
.
idNumber1
&&
user
.
idNumber2
&&
user
.
idNumber2
&&
user
.
id
&&
user
.
id
&&
user
.
password
&&
user
.
password
&&
user
.
checkpw
user
.
checkpw
)
);
);
},
[
user
]);
},
[
user
]);
...
@@ -153,6 +155,7 @@ const Signup = () => {
...
@@ -153,6 +155,7 @@ const Signup = () => {
/
>
/
>
<
/div
>
<
/div
>
<
/div
>
<
/div
>
{
console
.
log
(
disabled
)}
<
div
className
=
"
modal-footer
"
>
<
div
className
=
"
modal-footer
"
>
<
button
type
=
"
submit
"
className
=
"
btn btn-primary
"
disabled
=
{
disabled
}
>
<
button
type
=
"
submit
"
className
=
"
btn btn-primary
"
disabled
=
{
disabled
}
>
회원가입
회원가입
...
...
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