-
Notifications
You must be signed in to change notification settings - Fork 0
[Feat] 로그인, 회원가입 페이지 api 함수, msw 연결 #111
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
📊 Coverage Report
📉 #111을 main에 병합하면 coverage가 Coverage 요약@@ Coverage Diff @@
## main #111 +/- ##
===========================================
- Coverage 35.59% 32.90% -2.69%
===========================================
Files 91 97 +6
Lines 3492 3777 +285
Branches 174 180 +6
===========================================
Hits 1243 1243 0
+ Misses 2249 2534 +285 영향받은 파일✅ 이 PR로 영향받은 파일이 없습니다 수정된 모든 파일이 현재 coverage를 유지했습니다. |
🎨 Storybook Reportℹ️ Story 변경사항이 감지되지 않았습니다 이 PR에는 Story 변경이 없어서 빌드를 스킵했습니다.
|
|
Important Review skippedAuto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the You can disable this status message by setting the ✨ Finishing touches🧪 Generate unit tests (beta)
Comment |
🚀 PR Preview Report✨ Build가 성공적으로 완료되었습니다. Preview에서 변경사항을 확인하세요.
|
Chiman2937
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.
수고하셨습니다!
| password: value.password, | ||
| }; | ||
|
|
||
| const result = await login(payload); |
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.
현재 src/api/index.ts 에서 아래와 같이 export 하고 있기 때문에
export const API = provideAPIService();| const result = await login(payload); | |
| const result = API.authService.login(payload); |
이렇게 사용하시면 됩니다!
그러면 아래 구문이 필요없어지거든요
const { login } = authServiceRemote();
src/api/index.ts
Outdated
| usersService: userService, | ||
| authService: authService, |
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.
지금보니까 제가 작업을 잘못했네요 😭
authService 키와 값이 동일하므로 아래와 같이 변경하면 되겠네용
| usersService: userService, | |
| authService: authService, | |
| usersService, | |
| authService, |
userService는 추후에 제가 수정하겠습니다!
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.
넵
중복 호출 수정
📝 변경 사항
💡 types/service/auth.ts
SignupRequest,SignupResponse,LoginRequest,LoginResponse타입 정의💡 types/service/common.ts
CommonErrorResponse타입 정의💡 api/service/auth-service.ts 외
authServiceRemote추가 (로그인/회원가입/로그아웃 원격 API 연동)isProblemDetailError타입 가드 추가 (Axios + ProblemDetail 기반 에러 판별)💡 mocks/auth-mock.ts,
💡 mocks/auth-utils.ts,
💡 mocks/auth-handlers.ts
AuthMockUser및authMockUsers목 유저 데이터 정의createLoginResponse,createSignupResponse유틸 추가isEmailTaken,isNicknameTaken) 추가💡 components/pages/signup/signup-form/index.tsx
authServiceRemote().signup연동/login페이지로 이동getHintMessage를AnyFieldApi기반으로 공통화하여 필드별 검증 메시지 처리💡 components/pages/login/login-form/index.tsx
authServiceRemote().login연동/)으로 이동tanstack-form상태(canSubmit,isSubmitting,isPristine)를 사용한 버튼 비활성화 조건 정리🔗 관련 이슈
Closes #58
🧪 테스트 방법
📸 스크린샷 (선택)
📋 체크리스트
💬 추가 코멘트
A001,A002,A003)와 에러 메시지는 백엔드 스펙 확정 후 맞춰서 조정할 예정입니다.CommonErrorResponse구조와 에러 코드 매핑이 변경될 수 있습니다.CodeRabbit Review는 자동으로 실행되지 않습니다.
Review를 실행하려면 comment에 아래와 같이 작성해주세요