-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. Weβll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feature/signup kkm #69
base: develop
Are you sure you want to change the base?
Changes from 1 commit
172015d
debe830
18b0881
837cafe
ecbc132
ecf7fd8
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,6 +6,7 @@ import LocalStorage from "../../core/localStorage"; | |
import { IcSignupChecking } from "../../public/assets/icons"; | ||
import { UseFormDataType } from "../../types/signup"; | ||
import { errorPatterns } from "../../util/check"; | ||
import referralLinkLIst from "../../util/referralLinkList"; | ||
import { AlertLabel } from "../common"; | ||
import { DefaultButton } from "../common/styled/Button"; | ||
import { Input } from "../common/styled/Input"; | ||
|
@@ -35,10 +36,14 @@ export default function SignupForm(props: SignupFormProps) { | |
</> | ||
); | ||
|
||
const linkOfCondition = referralLinkLIst[0].href; | ||
|
||
const AgreeConditionBox = ( | ||
<StAgreeConditionBox htmlFor="signupAgree" onClick={onToggleIsAgreeCondition}> | ||
<StIcSignupChecking isagree={isAgree} /> | ||
<p>κ°μΈμ 보 μμ§ λ° μ΄μ© μ½κ΄μ λμν©λλ€.</p> | ||
<a href={linkOfCondition} target="_blank" rel="noopener noreferrer"> | ||
κ°μΈμ 보 μμ§ λ° μ΄μ© μ½κ΄μ λμν©λλ€. | ||
</a> | ||
</StAgreeConditionBox> | ||
); | ||
|
||
|
@@ -54,7 +59,7 @@ export default function SignupForm(props: SignupFormProps) { | |
|
||
{keyIndex === "email" && AgreeConditionBox} | ||
|
||
<StNextStepBtn disabled={!isDirty} type="submit"> | ||
<StNextStepBtn disabled={!isDirty || !isAgree} type="submit"> | ||
λ€μ κ³λ¨ | ||
</StNextStepBtn> | ||
</> | ||
|
@@ -87,6 +92,10 @@ const StAgreeConditionBox = styled.label` | |
|
||
margin: 1.7rem 0 0 0; | ||
|
||
& > a { | ||
text-decoration: underline; | ||
} | ||
Comment on lines
+93
to
+95
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. μ κ° νΌκ·Έλ§λ₯Ό νμΈνμ§λ λͺ»νλλ°, νΉμ μ΄ νμκ° |
||
|
||
${({ theme }) => theme.fonts.body6} | ||
`; | ||
|
||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -112,25 +112,17 @@ export default function Signup() { | |
setError("password", { type: "server", message: "λΉλ°λ²νΈκ° μΌμΉνμ§ μμ΅λλ€." }); | ||
} | ||
} else { | ||
// μ΄λ©μΌ μ λ ₯μ κ°μΈμ 보 μ·¨κΈ λ°©μΉ¨ λμλ₯Ό λ¨Όμ μ λ | ||
if (formDataKeyIndex === "email" && !isAgreeCondition) { | ||
setError(formDataKeyIndex, { | ||
type: "agreeCondition", | ||
message: "κ°μΈμ 보 μμ§ λ° μ΄μ© μ½κ΄μ λμν΄μ£ΌμκΈ° λ°λλλ€.", | ||
}); | ||
} else { | ||
// μλ²λ‘ λ°μ΄ν°λ₯Ό 보λ΄μ μ ν¨μ± κ²μ¬ | ||
// return: μ ν¨νμ§(isValid) && μλ¬ λ©μμ§(message) | ||
const { isValid, message } = await checkIsValid(formDataKeyIndex, key); | ||
|
||
if (isValid) { | ||
setNextStep(key); | ||
if (formDataKeyIndex === "email") { | ||
LocalStorage.setItem("booktez-email", loginFormData["email"]); | ||
} | ||
} else { | ||
setError(formDataKeyIndex, { type: "server", message }); | ||
// μλ²λ‘ λ°μ΄ν°λ₯Ό 보λ΄μ μ ν¨μ± κ²μ¬ | ||
// return: μ ν¨νμ§(isValid) && μλ¬ λ©μμ§(message) | ||
const { isValid, message } = await checkIsValid(formDataKeyIndex, key); | ||
|
||
if (isValid) { | ||
setNextStep(key); | ||
if (formDataKeyIndex === "email") { | ||
LocalStorage.setItem("booktez-email", loginFormData["email"]); | ||
} | ||
} else { | ||
setError(formDataKeyIndex, { type: "server", message }); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. (μ μ) μ ν¬ "email", "server" stringμ const μμλ‘ ννν¨μ μ΄λ¨κΉμ?? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. μ λμ¨ νμ μΌλ‘ μ μν΄λλ κ²λ μ’λ€κ΅¬ μκ°ν©λλΉ~ There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. (κΆμ₯) else ꡬ문μ μ΅λν νΌν΄μΌ κ°λ μ±μ΄ μ’μμ§λ€κ³ μκ°ν΄μ
|
||
} | ||
} | ||
}; | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
μ ~~~ λ³μ μμ± μ’λ€μ! !!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
μ ~~~ λ³μ μμ± μ’λ€μ! !!