-
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
[SKP-127] 카테고리 페이지 마크업 및 조회 API #25
Conversation
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.
점점 깔끔해지는 가영님 코드 >< 빨리 다음 PR도 리뷰하고 싶어요 히히 이번에도 고생 많으셨습니다 🔥
return res; | ||
}; | ||
|
||
const onRejected = async (error: AxiosError) => { |
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.
오옹! 여기서 JWT 이슈 처리하고 재발급 받는 로직 깔끔하네요! status 들만 저희 백에서 실제로 저 상태들로 내려주는지 확인 한번만 해보면 좋을거같아요 짱짱 👍
src/apis/axiosInstance.ts
Outdated
|
||
const statusArray = [4100, 4101, 4102, 4103, 4104]; | ||
|
||
if (originalConfig && includes(statusArray, error.response?.status)) { |
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.
loadash
라이브러리는 이 비교 때문에 설치하신 건가요?
저는 보통 이런 간단한 배열 비교는 js 배열 내장 includes 함수로 처리했어서! 해당 라이브러리를 꼭 사용해야 하는 이유가 궁금해요 👀
const statusArray = [4100, 4101, 4102, 4103, 4104];
statusArray.includes(error.response?.status);
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.
오 너무 좋아요! 무분별한 라이브러리 사용을 지양해야겠어요 ㅎㅎ! 수정 반영했습니다
그리고 저도 axios instance 때문에 ![]() |
🪄 Issue Number
🏆 Details
✅ Need Review
📸 Screenshot
RPReplay_Final1723529039.MP4