Commit 3611461a authored by Kim, Chaerin's avatar Kim, Chaerin
Browse files

disabled 수정

parent 655aefd3
......@@ -13,17 +13,19 @@ const INIT_USER = {
const Signup = () => {
const [user, setUser] = useState(INIT_USER);
const [error, setError] = useState("");
const [disabled, setDisabled] = useState(false);
const [success, setSuccess] = useState(false);
let disabled = false;
useEffect(() => {
disabled = !(
setDisabled(
!(
user.name &&
user.idNumber1 &&
user.idNumber2 &&
user.id &&
user.password &&
user.checkpw
)
);
}, [user]);
......@@ -153,6 +155,7 @@ const Signup = () => {
/>
</div>
</div>
{console.log(disabled)}
<div className="modal-footer">
<button type="submit" className="btn btn-primary" disabled={disabled}>
회원가입
......
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