-
Notifications
You must be signed in to change notification settings - Fork 1
[Week4/mission] 첫 커스텀 훅 만들어보기, 로그인 / 회원가입 기능 구현해보기 (feat. 유효성 검사) #28
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
Conversation
duwlsssss
left a comment
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.
고생하셨습니다 👍
| @@ -0,0 +1 @@ | |||
| VITE_TMDB_KEY=eyJhbGciOiJIUzI1NiJ9.eyJhdWQiOiJkOGRmZTQwYjM5YzUxNjAxYzQ4NzA2OGM2NjgzNmVjYiIsIm5iZiI6MTc0MzI0MzQyMC40NzMsInN1YiI6IjY3ZTdjODljYTNkOGNjOTI4ZTY3YmFlZSIsInNjb3BlcyI6WyJhcGlfcmVhZCJdLCJ2ZXJzaW9uIjoxfQ.cjYgjk2-VVPzkI_pRiX29eLnJex2p_pj2NAvM8H-V1c No newline at end of file | |||
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.
.env .gitignore에 추가해줘야 해요!
그리고 forcr push 한 번 해야겠네용
| const schema = z.object({ | ||
| email: z.string().email({ message: "올바른 이메일 형식이 아닙니다." }), | ||
| password: z.string().min(8, { message: "비밀번호는 8자 이상이여야 합니다." }), | ||
| passwordCheck: z | ||
| .string() | ||
| .min(8, { message: "비밀번호가 일치하지 않습니다." }), | ||
| name: z | ||
| .string() | ||
| .min(1, { message: "이름을 입력해주세요" }) | ||
| }) | ||
| .refine((data) => data.password === data.passwordCheck, { | ||
| message: "비밀번호가 일치하지 않습니다.", | ||
| path: ["passwordCheck"], | ||
| }); | ||
|
|
||
| type FormFields = z.infer<typeof schema>; |
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.
스키마는 다른 폴더로 분리하는게 가독성 있을 것 같아요!
| <input | ||
| {...register("email")} | ||
| className={`w-2xs p-4 mb-3 border border-gray-300 rounded-lg bg-white text-black focus:outline-none focus:ring-2 focus:ring-blue-500 | ||
| ${errors?.email ? "border-red-500 bg-red-200" : "border-gray-300"}`} | ||
| type={"email"} | ||
| placeholder={"이메일"} | ||
| /> | ||
| {errors?.email && ( | ||
| <div className="text-red-500 text-sm">{errors.email.message}</div> | ||
| )} |
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.
컴포넌트로 분리해서 다음 버튼으로 넘어가는 로직 구현하면 좋겠습니당
leetaesk
left a comment
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.
고생 많이 하셨어요 증말로
leetaesk
left a comment
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.
고생하셨습니다
S-Gihun
left a comment
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.
고생 많으셨습니다 !
✏️ 작업 내용
#️⃣ 연관된 이슈
#20
📷 작업 결과
Week4-Account.mp4
💡 함께 공유하고 싶은 부분
🤔 질문
✅ 워크북 체크리스트
✅ 컨벤션 체크리스트