Skip to content
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

Merged
merged 8 commits into from
Aug 13, 2024

Conversation

imeureka
Copy link
Collaborator

@imeureka imeureka commented Aug 13, 2024

🪄 Issue Number

🏆 Details

  • 카테고리 조회 API 연결
  • 인터셉터 추가 (토큰 자동 추가)
  • 카테고리 캐러셀 snap offset 수정

✅ Need Review

  • 인터셉터 추가로 따로 client api 인스턴스 만들지 않아도 될 것 같아요! 코드 확인 부탁드려요!

📸 Screenshot

RPReplay_Final1723529039.MP4

@imeureka imeureka added the feat💡 기능 추가 label Aug 13, 2024
@imeureka imeureka self-assigned this Aug 13, 2024
@imeureka imeureka requested a review from yusiny as a code owner August 13, 2024 06:06
@imeureka imeureka changed the title Skp 127 category UI [Skp-127] 카테고리 페이지 마크업 및 조회 API Aug 13, 2024
@yusiny yusiny changed the title [Skp-127] 카테고리 페이지 마크업 및 조회 API [SKP-127] 카테고리 페이지 마크업 및 조회 API Aug 13, 2024
Copy link
Member

@yusiny yusiny left a 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) => {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

오옹! 여기서 JWT 이슈 처리하고 재발급 받는 로직 깔끔하네요! status 들만 저희 백에서 실제로 저 상태들로 내려주는지 확인 한번만 해보면 좋을거같아요 짱짱 👍


const statusArray = [4100, 4101, 4102, 4103, 4104];

if (originalConfig && includes(statusArray, error.response?.status)) {
Copy link
Member

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);

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

오 너무 좋아요! 무분별한 라이브러리 사용을 지양해야겠어요 ㅎㅎ! 수정 반영했습니다

@yusiny
Copy link
Member

yusiny commented Aug 13, 2024

그리고 저도 axios instance 때문에 client.ts 파일 하나 만들어서 사용하고 있어서! 나중에 제 브랜치 작업할 때 합쳐둘게요!
제 코드는 BaseResponse로 응답 기본 형식 정해진 거랑, 인스턴스 말고 그냥 GET, POST, ... 함수들 export 해서 사용한다는 차이점만 있는 거 같아요 @imeureka

스크린샷 2024-08-13 15 34 23

@imeureka imeureka merged commit 8f7db67 into main Aug 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feat💡 기능 추가
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[SKP-127] [FRONT] 카테고리 퍼블리싱
2 participants