Skip to content
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

Open
wants to merge 6 commits into
base: develop
Choose a base branch
from
Open

Feature/signup kkm #69

wants to merge 6 commits into from

Conversation

Gyuminn
Copy link
Member

@Gyuminn Gyuminn commented Jan 30, 2023

πŸ“Œ λ‚˜ 이런 κ±° ν–ˆμ–΄μš”

  • [νšŒμ›κ°€μž… 1단계]
    밑쀄 + 링크λ₯Ό μΆ”κ°€ν•˜μ˜€κ³ , μ•½κ΄€ 체크λ₯Ό ν•˜μ§€ μ•Šμ•˜λ‹€λ©΄ 'λ‹€μŒ 계단'을 λΉ„ν™œμ„±ν™” μƒνƒœλ‘œ λ§Œλ“€μ–΄μ£Όμ—ˆμŠ΅λ‹ˆλ‹€.
  • [νšŒμ›κ°€μž… 2단계]
    2λ‹¨κ³„λ‘œ λ„˜μ–΄μ˜¨ μ§ν›„μ—λŠ” 아무것도 μž…λ ₯λ˜μ–΄μžˆμ§€ μ•ŠκΈ° λ•Œλ¬Έμ— 'λ‹€μŒ 계단'을 λΉ„ν™œμ„±ν™” μƒνƒœλ‘œ λ§Œλ“€μ–΄μ£Όμ—ˆμŠ΅λ‹ˆλ‹€.
  • [νšŒμ›κ°€μž… 2단계]
    #μ΄λ‚˜ & 같은 νŠΉμˆ˜λ¬Έμžκ°€ ν—ˆμš©λ˜κ³  μžˆμ—ˆλŠ”λ°, λ‹‰λ„€μž„ λ‘œμ§μ—μ„œλŠ” μ„œλ²„μ—μ„œ μœ νš¨μ„± 검사λ₯Ό ν•΄μ£Όκ³  μžˆμ—ˆμŠ΅λ‹ˆλ‹€.
    μ„œλ²„ μΈ‘μ—μ„œ μˆ˜μ •μ²˜λ¦¬λ₯Ό ν•΄μ£ΌλŠ” 것도 μ’‹κ² μ§€λ§Œ, μœ νš¨μ„± 검사 μžμ²΄λŠ” ν΄λΌμ΄μ–ΈνŠΈμ™€ μ„œλ²„ μ–‘ μΈ‘μ—μ„œ λͺ¨λ‘ ν•΄μ£ΌλŠ” 것이 쒋닀고도
    μ•Œκ³  μžˆμ–΄μ„œ μ •κ·œμ‹ μΆ”κ°€ 검사λ₯Ό ν•΄μ£Όμ—ˆμŠ΅λ‹ˆλ‹€.
  • [νšŒμ›κ°€μž… 2단계]
    문ꡬλ₯Ό λ³€κ²½ν•˜μ˜€μŠ΅λ‹ˆλ‹€.
  • [νšŒμ›κ°€μž… 3단계]
    λΉ„λ°€λ²ˆν˜Έ μž…λ ₯ ν™”λ©΄ 문ꡬ μˆ˜μ • μ˜ˆμ •
  • [νšŒμ›κ°€μž… 전체]
    νšŒμ› κ°€μž… ν™”λ©΄μ—μ„œ λ’€λ‘œ κ°€κΈ° μ‹œ μƒˆλ‘œκ³ μΉ¨ λ˜λŠ” μƒνƒœμ—μ„œ 이전 단계 ν™”λ©΄(μ‹€μ œλ‘œλŠ” μ»΄ν¬λ„ŒνŠΈλ§Œ λ³€κ²½)으둜 μ΄λ™ν•˜λ„λ‘ ν•˜μ˜€μŠ΅λ‹ˆλ‹€.

πŸ“Œ λ‚˜ 이런 κ±° μ•Œκ²Œ λ˜μ—ˆμ–΄μš”

  • useForm의 setValue μ˜΅μ…˜μ—μ„œ shouldDefault κ°’μœΌλ‘œ isDirty 값을 변경해쀄 수 μžˆλŠ” 것을 μ•Œκ²Œ λ˜μ—ˆλŠ”λ°, isDirty κ΄€λ ¨ν•΄μ„œ μ „λ°˜μ μΈ μˆ˜μ •μž‘μ—…μ΄ ν•„μš”ν•  것 κ°™μŠ΅λ‹ˆλ‹€. μžμž˜ν•œ 버그가 μžˆλŠ” μƒνƒœμž…λ‹ˆλ‹€.

πŸ“Œ λ‚˜ 이런 κ±° κΆκΈˆν•΄μš”

  • 메인 νŽ˜μ΄μ§€ 쒌츑 λ°°λ„ˆμ—μ„œ νšŒμ›κ°€μž…μ— λ“€μ–΄κ°€λŠ” 경우 살짝 νŠ€λŠ” ν˜„μƒ(λ Œλ”λ§ 깜빑)이 λ°œμƒν•˜λŠ” 것 같은데 μΆ”ν›„ 확인이 ν•„μš”ν•  것 κ°™μŠ΅λ‹ˆλ‹€.

@vercel
Copy link

vercel bot commented Jan 30, 2023

The latest updates on your projects. Learn more about Vercel for Git β†—οΈŽ

Name Status Preview Comments Updated
nextjs-book-stairs βœ… Ready (Inspect) Visit Preview πŸ’¬ Add your feedback Feb 8, 2023 at 2:12AM (UTC)

Copy link
Member

@joohaem joohaem left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

멋지고 κ³ λ§ˆμ›Œμš”!!!!! 리뷰 μ½”λ©˜νŠΈ λ‹¬μ•„λ†¨μ–΄μš”-

μ˜€λžœλ§Œμ— μž‘μ—…ν•΄λ³΄μ‹œλ‹ˆ μ–΄λ– μ‹ κ°€μš” k k μ΄λŸ¬λ‹€ λ‹€μ‹œ FE 세계 μ˜€λŠ” κ±° μ•„λ‹Œκ°€λͺ°λΌ~


메인 νŽ˜μ΄μ§€ 쒌츑 λ°°λ„ˆμ—μ„œ νšŒμ›κ°€μž…μ— λ“€μ–΄κ°€λŠ” 경우 살짝 νŠ€λŠ” ν˜„μƒ(λ Œλ”λ§ 깜빑)이 λ°œμƒν•˜λŠ” 것 같은데 μΆ”ν›„ 확인이 ν•„μš”ν•  것 κ°™μŠ΅λ‹ˆλ‹€.

ν™•μΈν•΄λ³΄λ‹ˆ, 좔츑상
pages/login.tsxμ—μ„œ isAniTime 으둜 μ• λ‹ˆλ©”μ΄μ…˜ 1μ΄ˆκ°„ μ‹€ν–‰ν•˜λŠ”λ°
λ‹€μŒ νŽ˜μ΄μ§€λ‘œ λ„˜μ–΄κ°ˆ λ•Œ κ·Έ νŽ˜μ΄μ§€ νŒŒμΌμ„ λΆˆλŸ¬μ˜€λŠ” λ™μ•ˆ 둜그인 νŽ˜μ΄μ§€λ₯Ό λ³΄μ—¬μ£ΌλŠ” 것 κ°™μ•„μš”
λ¦¬μ•‘νŠΈμ—μ„œλŠ” λ™μž‘μ΄ λΉ¨λΌμ„œ μ•ˆ κ·Έλž¬λŠ”λ° λ„₯μŠ€νŠΈμ—μ„œλŠ” MPA νŠΉμ„±μƒ html νŒŒμΌμ„ λΆˆλŸ¬μ˜€λŠ” μ‹œκ°„μ΄ μžˆλ‹€λ³΄λ‹ˆκΉŒ 간극이 쑰금 μƒκΈ°λ‚˜λ³΄λ„€μš”
νšŒμ›κ°€μž… 폼처럼 framer-motion 으둜 μ–Έλ§ˆμš΄νŠΈ 될 λ•Œμ˜ μ• λ‹ˆλ©”μ΄μ…˜μ„ 달아주어야 ν•  것 κ°™μ•„μš”!
-> μ œκ°€ 주말에 ν• κ²Œμš”! ν•˜κ³  μ‹ΆμœΌλ©΄ ν• λžŒν• ~

@@ -35,10 +36,14 @@ export default function SignupForm(props: SignupFormProps) {
</>
);

const linkOfCondition = referralLinkLIst[0].href;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

μ•„ ~~~ λ³€μˆ˜ 생성 μ’‹λ„€μš”! !!

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

μ•„ ~~~ λ³€μˆ˜ 생성 μ’‹λ„€μš”! !!

Comment on lines 121 to 125
if (formDataKeyIndex === "email") {
LocalStorage.setItem("booktez-email", loginFormData["email"]);
}
} else {
setError(formDataKeyIndex, { type: "server", message });
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(μ œμ•ˆ) 저희 "email", "server" string을 const μƒμˆ˜λ‘œ ν‘œν˜„ν•¨μ€ μ–΄λ–¨κΉŒμš”??

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

μœ λ‹ˆμ˜¨ νƒ€μž…μœΌλ‘œ μ •μ˜ν•΄λ‘λŠ” 것도 쒋닀ꡬ μƒκ°ν•©λ‹ˆλ‹Ή~

Comment on lines 119 to 125
if (isValid) {
setNextStep(key);
if (formDataKeyIndex === "email") {
LocalStorage.setItem("booktez-email", loginFormData["email"]);
}
} else {
setError(formDataKeyIndex, { type: "server", message });
Copy link
Member

@joohaem joohaem Jan 31, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(ꢌμž₯) else ꡬ문을 μ΅œλŒ€ν•œ ν”Όν•΄μ•Ό 가독성이 쒋아진닀고 μƒκ°ν•΄μš”

!isValid 둜 μ—λŸ¬ 처리λ₯Ό ν•œ 후에 return μ‹œν‚€κ³ , κ·Έ μ•„λž˜μ— λ‘œμ§μ„ ꡬ성함은 μ–΄λ–¨κΉŒμš”??

Comment on lines +125 to +134
if (isValid) {
setNextStep(inputValue);

if (formDataKeyIndex === "email") {
LocalStorage.setItem("booktez-email", loginFormData["email"]);
}

return;
}
setError(formDataKeyIndex, { type: "server", message });
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

μš”ν˜Έ μ΄λ ‡κ²Œ λ˜μ—ˆκ΅°μš”!!
이것도 μ’‹μ§€λ§Œ, μœ„μ—μ„œ 말 ν•œ κ²ƒμ²˜λŸΌ μ—λŸ¬ 체킹을 μœ„λ‘œ 올리면, if 의 λŽμŠ€κ°€ κΉŠμ–΄μ§€μ§€ μ•Šμ„ 수 μžˆμ„ 것 κ°™μ•„μš”

setValue(formDataKeyIndex, "");
setValue(formDataKeyIndex, "", { shouldDirty: true });
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

πŸ‘πŸ‘

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

πŸ‘πŸ‘πŸ‘πŸ‘

Comment on lines +4 to +5
const NICKNAME_REGEX = /^(?=.*[a-z0-9κ°€-힣])[a-z0-9κ°€-힣]{2,10}$/i;

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

πŸ‘πŸ‘

Comment on lines 139 to 150
if (formDataKeyIndex == "nickname" || formDataKeyIndex == "password") {
const prevFormDataKeyIndex = formDataKeyIndex == "password" ? "nickname" : "email";

history.pushState(null, "", "");
window.onpopstate = () => {
setFormDataKeyIndex(prevFormDataKeyIndex);
};
} else {
window.onpopstate = () => {
// μ΄ˆκΈ°ν™”
};
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

switchλ¬Έ μ‚¬μš©ν•˜λŠ” 게 μ’€ 더 μ•Œμ•„λ³΄κΈ° μ‰¬μš°λ €λ‚˜ μ‹Άλ„€μš”!

Copy link
Member

@joohaem joohaem Jan 31, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(ꢌμž₯) if-else에, μ‚Όν•­μ—°μ‚°κΉŒμ§€ μžˆμœΌλ‹ˆ μ–΄λ–€ μ½”λ“œμΈμ§€ λͺ…ν™•νžˆ μ•ˆ μ™€λ‹ΏλŠ” 것 κ°™μ•„μš”
formDataKeyIndex κ°’μœΌλ‘œ switch λ¬Έ ν™œμš©ν•˜λ©΄ 쒋을 것 κ°™μŠ΅λ‹ˆλ‹·

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

μ—¬κΈ°μ„œλŠ” μ§„μ§œ 별거 μ•„λ‹Œλ°, === κ°€ μ•„λ‹Œ == 인 μ΄μœ κ°€ μžˆλ‚˜μš€?

Copy link
Contributor

@soryeongk soryeongk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

규민이 μ½”λ“œλ₯Ό λ‹€μ‹œ 보게 λ˜λ‹€λ‹ˆ λ‚˜ 우럭.. λ‹€μ‹œ λŒμ•„μ™€~ λŒμ•„μ™€ λŒμ•„μ™€~~

@@ -35,10 +36,14 @@ export default function SignupForm(props: SignupFormProps) {
</>
);

const linkOfCondition = referralLinkLIst[0].href;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

μ•„ ~~~ λ³€μˆ˜ 생성 μ’‹λ„€μš”! !!

Comment on lines 121 to 125
if (formDataKeyIndex === "email") {
LocalStorage.setItem("booktez-email", loginFormData["email"]);
}
} else {
setError(formDataKeyIndex, { type: "server", message });
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

μœ λ‹ˆμ˜¨ νƒ€μž…μœΌλ‘œ μ •μ˜ν•΄λ‘λŠ” 것도 쒋닀ꡬ μƒκ°ν•©λ‹ˆλ‹Ή~

Comment on lines +95 to +97
& > a {
text-decoration: underline;
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

μ œκ°€ ν”Όκ·Έλ§ˆλ₯Ό ν™•μΈν•˜μ§€λŠ” λͺ»ν–ˆλŠ”데, ν˜Ήμ‹œ 이 ν‘œμ‹œκ°€ κ°œμΈμ •λ³΄ μˆ˜μ§‘ 및 이용 약관에 λ™μ˜ν•©λ‹ˆλ‹€. 전체가 μ•„λ‹Œ κ°œμΈμ •λ³΄ μˆ˜μ§‘ 및 이용 μ•½κ΄€μ—λ§Œ ν•΄λ‹Ήλ˜λŠ” 것은 μ•„λ‹Œκ°€μš₯?

setValue(formDataKeyIndex, "");
setValue(formDataKeyIndex, "", { shouldDirty: true });
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

πŸ‘πŸ‘πŸ‘πŸ‘

setNextStep(inputValue);

if (formDataKeyIndex === "email") {
LocalStorage.setItem("booktez-email", loginFormData["email"]);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

λ‘œμ»¬μŠ€ν† λ¦¬μ§€ ν‚€λ₯Ό μƒμˆ˜λ‚˜ νƒ€μž…μœΌλ‘œ μ •μ˜ν•΄λ‘λ©΄ (λ‚˜μ€‘μ— μ½”λ“œλ₯Ό κ³ μΉ  λˆ„κ΅°κ°€κ°€ νŽΈν•΄μ§ˆ 것 κ°™μ•„μ„œ)쒋을 것 κ°™λ‹€λŠ” 생각이 λ“œλŠ”λ°, ν•„μˆ˜λŠ” μ•„λ‹™λ‹ˆλ‹Ή(근데 ν•΄μ£Όλ©΄ 쒋을 것 같은 λŠλ‚Œμ •λ„)

Comment on lines 139 to 150
if (formDataKeyIndex == "nickname" || formDataKeyIndex == "password") {
const prevFormDataKeyIndex = formDataKeyIndex == "password" ? "nickname" : "email";

history.pushState(null, "", "");
window.onpopstate = () => {
setFormDataKeyIndex(prevFormDataKeyIndex);
};
} else {
window.onpopstate = () => {
// μ΄ˆκΈ°ν™”
};
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

μ—¬κΈ°μ„œλŠ” μ§„μ§œ 별거 μ•„λ‹Œλ°, === κ°€ μ•„λ‹Œ == 인 μ΄μœ κ°€ μžˆλ‚˜μš€?

@Gyuminn
Copy link
Member Author

Gyuminn commented Feb 8, 2023

도움을 μš”μ²­ν•©λ‹ˆλ‹€!!γ…œγ…œ
@soryeongk @joohaem
μ œκ°€ μ–΄λ–»κ²Œλ“  해보렀고 ν–ˆλŠ”λ° 잘 λ˜μ§€ μ•Šμ•„μ„œ ν˜„μž¬κΉŒμ§€ ν•œ 뢀뢄을 머지(κΈ°λŠ₯상 μ—λŸ¬λŠ” x)ν•˜κ³ , μž‘μ—…μ„ λ„μ™€μ£Όμ‹œλ©΄ κ°μ‚¬ν•˜κ² μŠ΅λ‹ˆλ‹€.

πŸ“Œ μž‘μ—…μ€‘ 버그가 λ°œμƒν•œ λ²„νŠΌ ν™œμ„±ν™” λ¬Έμ œλŠ” λ‹€μŒκ³Ό κ°™μŠ΅λ‹ˆλ‹€.

  • νšŒμ› κ°€μž… 3단계쀑 (email <-> nickname)μ—μ„œ λ’€λ‘œκ°€κΈ°, λ‹€μŒλ‹¨κ³„λ₯Ό λ°˜λ³΅ν•˜λŠ” 것은 λ¬Έμ œκ°€ μ—†μŠ΅λ‹ˆλ‹€λ§Œ, (nickname <-> password) 뢀뢄을 μ™”λ‹€κ°”λ‹€ ν•  λ•Œ λ²„νŠΌ ν™œμ„±ν™” λ¬Έμ œκ°€ λ°œμƒν•©λ‹ˆλ‹€. password λΆ€λΆ„μ—μ„œ nickname으둜 갈 λ•ŒλŠ” μ •μƒμž‘λ™ν•˜μ§€λ§Œ, 이 ν›„ λ’€λ‘œκ°€κΈ°, λ‹€μŒλ‹¨κ³„λ₯Ό λ°˜λ³΅ν•  λ•Œ λ²„νŠΌμ΄ ν™œμ„±ν™”λœ μ±„λ‘œ μ‘΄μž¬ν•©λ‹ˆλ‹€. useEffect의 λ’€λ‘œκ°€κΈ° λ‘œμ§μ—μ„œμ˜ λ¬Έμ œμΈμ§€, useForm의 isDirty μ—…λ°μ΄νŠΈ λ¬Έμ œμΈμ§€ λͺ¨λ₯΄κ² μ–΄μ„œ 도움을 μš”μ²­ν•©λ‹ˆλ‹€..!!!

πŸ“Œ ν• λ‹Ήλœ μž‘μ—… 쀑 μœ„μ˜ λ¬Έμ œκ°€ ν•΄κ²°λ˜μ§€ λͺ»ν•΄ μ§„ν–‰ν•˜μ§€ λͺ»ν•œ μž‘μ—…μ€ λ‹€μŒκ³Ό κ°™μŠ΅λ‹ˆλ‹€.

  • [νšŒμ›κ°€μž… 3단계] 쀑 'λΉ„λ°€λ²ˆν˜Έ ν˜•μ‹ 확인 문ꡬ', 'λ””μžμΈκ΄€λ ¨', 'κΈ°λŠ₯κ΄€λ ¨' - (λ…Έμ…˜μ—μ„œ 확인할 수 μžˆμŠ΅λ‹ˆλ‹€.)
  • μ½”λ“œλ¦¬λ·° ν•΄μ£Όμ‹  λ¦¬νŒ©ν† λ§ 사항. - λœ―μ–΄κ³ μ³μ•Ό ν•  μˆ˜λ„ μžˆμ„κ²ƒ κ°™μ•„μ„œ 일단 λƒ…λ‘μ—ˆμŠ΅λ‹ˆλ‹€.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants