diff --git a/src/components/signup/PasswordVerification.tsx b/src/components/signup/PasswordVerification.tsx index 1a5364f..7e89d30 100644 --- a/src/components/signup/PasswordVerification.tsx +++ b/src/components/signup/PasswordVerification.tsx @@ -47,16 +47,6 @@ const PasswordVerification = ({ userName, userEmail }: { userName: string; userE } }; - const handleAllAgreed = () => { - const newAllAgreed = !allAgreed; - setAllAgreed(newAllAgreed); - setTermsCheckIcon(newAllAgreed); - setServiceTermsCheckIcon(newAllAgreed); - setPrivacyTermsCheckIcon(newAllAgreed); - setMarketingTermsCheckIcon(newAllAgreed); - checkFormValidity(); - }; - const handleServiceTermsCheck = () => { const newServiceTermsCheckIcon = !serviceTermsCheckIcon; setServiceTermsCheckIcon(newServiceTermsCheckIcon); @@ -64,7 +54,7 @@ const PasswordVerification = ({ userName, userEmail }: { userName: string; userE checkFormValidity(); updateAllAgreedIcon(); }; - + const handlePrivacyTermsCheck = () => { const newPrivacyTermsCheckIcon = !privacyTermsCheckIcon; setPrivacyTermsCheckIcon(newPrivacyTermsCheckIcon); @@ -72,7 +62,7 @@ const PasswordVerification = ({ userName, userEmail }: { userName: string; userE checkFormValidity(); updateAllAgreedIcon(); }; - + const handleMarketingTermsCheck = () => { const newMarketingTermsCheckIcon = !marketingTermsCheckIcon; setMarketingTermsCheckIcon(newMarketingTermsCheckIcon); @@ -80,27 +70,35 @@ const PasswordVerification = ({ userName, userEmail }: { userName: string; userE checkFormValidity(); updateAllAgreedIcon(); }; - - const updateAllAgreedIcon = () => { + + const checkAllAgreed = () => { if (serviceTermsCheckIcon && privacyTermsCheckIcon && marketingTermsCheckIcon) { setAllAgreed(true); - setTermsCheckIcon(true); } else { setAllAgreed(false); - setTermsCheckIcon(false); } }; - - const checkAllAgreed = () => { - if (serviceTermsCheckIcon && privacyTermsCheckIcon && marketingTermsCheckIcon) { - setAllAgreed(true); + + const updateAllAgreedIcon = () => { + if (allAgreed) { + setTermsCheckIcon(true); } else { - setAllAgreed(false); + setTermsCheckIcon(false); } }; + + const handleAllAgreed = () => { + const newAllAgreed = !allAgreed; + setAllAgreed(newAllAgreed); + setServiceTermsCheckIcon(newAllAgreed); + setPrivacyTermsCheckIcon(newAllAgreed); + setMarketingTermsCheckIcon(newAllAgreed); + checkFormValidity(); + }; + const handleNextButtonClick = () => { - + // todo }; return ( @@ -249,14 +247,18 @@ const PasswordVerification = ({ userName, userEmail }: { userName: string; userE
- ) : ( + )} -
모두 동의합니다
- +