-
Notifications
You must be signed in to change notification settings - Fork 3
[FEAT] 이번주 인기 스테이 불러오기 api 연결 #132
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
🪷 Storybook 확인 🪷 |
const PopularCarousel = () => { | ||
const userId = localStorage.getItem('userId'); |
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.
현재 userId가 string으로 사용되고 있는데, 서버에서 Long으로 선언되어있으므로 Number로 반환하면 좋을 것 같아요!
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.
수정했습니다 ! 08f73b5
|
||
if (isError) { | ||
return <p>Error</p>; | ||
} |
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/apis/ranking/index.ts
Outdated
|
||
const useGetRanking = (userId: string | null) => { | ||
const { data, isLoading, isError } = useQuery<RankingResponse>({ | ||
queryKey: ['rankiing', userId], |
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.
오타 ranking으로 바꿔주세요
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.
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.
첫 API 연결!! 고생하셨습니다
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.
첫 api 연결!!! 수고하셨습니당
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.
멋져용 리뷰에 남긴 부분은 추후에 수정하면 좋을 것 같습니다!! 고생하셨어요!!
import { privateInstance } from '@apis/instance'; | ||
|
||
const getRanking = async (userId: number | null) => { | ||
const res = await privateInstance.get('/ranking', { |
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.
현재 privateInstance로 연결하고 있는데 해당 인기스테이에서 로그인하지 않은 사용자도 불러올 수 있으니 해당 부분 추후에 수정이 필요할 것으로 보입니다.
🛰️ 관련 이슈
🧑💻 작업 내용
🗯️ PR 포인트
🚀 알게된 점
📖 참고 자료 (선택)
📸 스크린샷 (선택)