-
Notifications
You must be signed in to change notification settings - Fork 0
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
지출 내역 확인 페이지 UI 구현 #26
Open
yoouyeon
wants to merge
19
commits into
develop
Choose a base branch
from
feat/#15-expense-list-ui
base: develop
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
+830
−166
Conversation
This file contains 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
- bill → expense - participant → member
- enableMocking 함수 추가 - 개발 환경에서 worker가 시작된 이후에 렌더링을 시작하도록 수정 - https://mswjs.io/docs/integrations/browser#conditionally-enable-mocking
X-Mock-Request 헤더와 함께 요청하는 경우에만 모킹하도록 함
- axiosInstance 추가 - useMock true일 때 모킹 헤더를 추가하는 인터셉터
- 지출 요청을 위한 expense service 추가 - useGetAllExpense 훅 추가
- https://mswjs.io/docs/integrations/browser - worker를 제대로 import해오지 못하고 있었던 것 같다...
- close - edit (임시) - next (임시)
- 임시 Close 아이콘 제거 - 컴포넌트 디자인 일부 적용
- 지출 아이디 프로퍼티 추가
- distributeAmount - distributeAmount 테스트 코드
- ConfirmStep 퍼널 - ExpenseCardList 컴포넌트 - ExpenseCard 컴포넌트
8 tasks
github-actions
bot
added
Priority 1
1순위 작업
✨ Feature
새로운 기능 추가나 개선을 위한 작업
🖥️ FE
프론트엔드 작업
labels
Feb 6, 2025
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.
📝 관련 이슈
💻 작업 내용
1. 라이브러리 설치와 설정
axios
를 설치하고 기본 instance를 추가했습니다 (5f7b8c3)date-fns
를 설치했습니다. (날짜 포맷팅용...) (react-datepicker라이브러리의 dependency로 되어 있길래 동일한 버전으로 설치했어요.) (d3cdfb8)2. msw 설정
2-1 msw 오류 수정 🥹
아래 두 문제가 있었고 수정했습니다.
정확한 원인인지는 모르겠지만,
첫번째 문제는 worker.start() 함수가 종료되기 전에 랜더링이 되는 경우가 종종 생기면서 랜덤하게 발생한 문제였던 것 같고
두번째 문제는 (정확한 이유는 잘 모르겠지만...) worker import가 제대로 안되는 것이 원인이었던 것 같습니다.
공식 문서를 참고해서 (https://mswjs.io/docs/integrations/browser#conditionally-enable-mocking) worker가 완전히 시작한 뒤에 랜더링이 시작하도록 하고, worker도 worker 시작 전에 await으로 완전히 import되는 것을 기다리도록 했습니다.
worker 시작을 기다리고 랜더링하는 탓에 최초 랜더링 시간이 좀 늦어지긴 했는데, 개발 환경이 아닌 경우에는 (아마도) 문제 없을 것 같지만,,,, 만약에 나중에 영향이 있다면 주석 처리해야 할 듯 합니다 🥲
📍 2-2 모킹한 API를 사용하는 요청 헤더 설정
Mock API와 실제 API를 구분하는 방법이 여러 방식이 있을 것 같은데요.
이 2가지 방법을 생각을 해봤는데,
첫번째 방식인 다른 baseUrl을 가진 axiosInstance를 2개 관리하는 것이 개인적으로는 좀 번거로운 느낌이 들었었거든요.
그래서
으로 한번 설정을 해 보았습니다.......
⭐️⭐️ 그냥 임의로 설정한거고 수정하는 것이 어렵지 않아서
더 선호하는 방식, 혹은 다른 프로젝트에서 하셨던 방식이 좋았다면 알려주시면 정말 감사하겠습니다!!!!!!!!!!! ⭐️⭐️
3. 명칭 정리 (?)
백엔드에서 정의해둔 DTO를 참고해서 명칭을 정리했습니다.
4. 지출 내역 확인 페이지 UI 구현
이번에 변경사항이 충분히 많아서 아직 헤더와 레이아웃은 적용하지 않았습니다! (다음 PR에 작업해서 올릴게요 🥹)
✅ 테스트 리스트
각 참여자에게 지출을 분배하는 유틸함수 -
distributeAmount
📸 스크린샷
👻 리뷰 요구사항