[Week4/mission] 첫 커스텀 훅 만들어보기, 로그인 / 회원가입 기능 구현해보기 (feat. 유효성 검사)#28
Closed
starvingorange wants to merge 5 commits intomainfrom
Closed
[Week4/mission] 첫 커스텀 훅 만들어보기, 로그인 / 회원가입 기능 구현해보기 (feat. 유효성 검사)#28starvingorange wants to merge 5 commits intomainfrom
starvingorange wants to merge 5 commits intomainfrom
Conversation
duwlsssss
approved these changes
Apr 11, 2025
| @@ -0,0 +1 @@ | |||
| VITE_TMDB_KEY=eyJhbGciOiJIUzI1NiJ9.eyJhdWQiOiJkOGRmZTQwYjM5YzUxNjAxYzQ4NzA2OGM2NjgzNmVjYiIsIm5iZiI6MTc0MzI0MzQyMC40NzMsInN1YiI6IjY3ZTdjODljYTNkOGNjOTI4ZTY3YmFlZSIsInNjb3BlcyI6WyJhcGlfcmVhZCJdLCJ2ZXJzaW9uIjoxfQ.cjYgjk2-VVPzkI_pRiX29eLnJex2p_pj2NAvM8H-V1c No newline at end of file | |||
Contributor
There was a problem hiding this comment.
.env .gitignore에 추가해줘야 해요!
그리고 forcr push 한 번 해야겠네용
Comment on lines
+6
to
+21
| 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>; |
Contributor
There was a problem hiding this comment.
스키마는 다른 폴더로 분리하는게 가독성 있을 것 같아요!
Comment on lines
+47
to
+56
| <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> | ||
| )} |
Contributor
There was a problem hiding this comment.
컴포넌트로 분리해서 다음 버튼으로 넘어가는 로직 구현하면 좋겠습니당
JeonSuna
approved these changes
Apr 11, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
✏️ 작업 내용
#️⃣ 연관된 이슈
#20
📷 작업 결과
Week4-Account.mp4
💡 함께 공유하고 싶은 부분
🤔 질문
✅ 워크북 체크리스트
✅ 컨벤션 체크리스트