-
Notifications
You must be signed in to change notification settings - Fork 18
[정성현] sprint11 #134
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
The head ref may contain hidden characters: "Next-\uC815\uC131\uD604-sprint11"
[정성현] sprint11 #134
Conversation
- 미디어 컨텍스트 파일 내부로 이동
- 이전 미션에 진행한 로그인/회원가입 페이지를(로직 제외) Next.js 환경으로 마이그레이션
- 로그인 여부에 따라 프로필 / 로그인 버튼을 보이도록 구현
- fetch 함수를 활용한 로그인/회원가입 API 구현
- 로그인/회원가입 폼에 API 연결
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.
성현님 이번 스프린트 미션 고생하셨습니다~
멘토에게 섹션에서 말씀해주신대로 validation, error 관련 로직들도 추가해주시면 좋을 것 같아요~
또한 비밀번호 인풋에서 눈 아이콘이 동작하지 않으니 이도 확인해보시면 좋겠습니다.
언급해주신 로그인 기능의 경우 useQuery를 의심해봅니다~
handleFormSubmit
에서 await query
를 호출하시고 data
값을 localStorage에 저장하시는데 handleFormSubmit
에서 data
에 접근할때 값이 비어있어 두번호출을 해야 예상하는 동작으로 수행되는 것처럼 보입니다~
한번 테스트해보시고 수정해보세요 😁
|
||
return ( | ||
<MediaContext.Provider value={media}>{children}</MediaContext.Provider> | ||
); | ||
} | ||
|
||
export function useMedia() { |
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.
P3:
👍
import styles from "./SignUpForm.module.css"; | ||
|
||
export default function SignUpForm() { | ||
const [formData, setFormData] = useState<PostSignUpParams>({ |
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.
P3:
제 기억에 의하면 react-hook-form을 사용해보라는게 요구사항에 있으니 나중에 validation, error 관련 로직 추가하실때 해당 라이브러리로 해보시면 좋을 것 같아요~
} | ||
|
||
alert("회원가입에 성공했습니다.\n로그인 후 이용해 주세요!"); | ||
replace("/login"); |
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.
P3:
👍
요구사항
기본
회원가입
로그인
메인
주요 변경사항
(HTML/CSS만 마이그레이션하고, 로직 관련 JS는 마이그레이션X)
스크린샷
멘토에게
ID: jsh@test.com / PW: password
)(단순 await 키워드 문제는 아닌가 봐요😥)