-
Notifications
You must be signed in to change notification settings - Fork 2
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
[FEAT] 리뷰 api 연결 #91
[FEAT] 리뷰 api 연결 #91
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.
tanstack query 잘 적용해주신 것 같아요 👍👍
예림님 리뷰하면서 저도 tanstack-query 찾아보면서 개념 정리를 할 수 있었던 것 같아요 2주간 고생 많으셨습니다~~!! |
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 잘 붙여주신 것 확인했습니다! 에러 처리 부분을 에러 메세지를 콘솔에 찍어주는 방향으로만 수정하면 더욱 좋을 것 같아요! 고생하셨습니다!!
import instance from '@apis/instance'; | ||
import { AxiosError } from 'axios'; | ||
|
||
export interface Review { |
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.
인터페이스 깰꼼하구만요!
const { data, isError } = useReviewQueries({ productId }); | ||
|
||
if (isError) { | ||
console.error(isError); |
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.
isError는 정말 에러인지 아닌지 true, false의 값만 가지고 있어서 해당 부분에서 true라는 콘솔이 찍히게 됩니다! 따라서 콘솔에서 구체적인 에러 메세지를 확인하고 싶다면 error를 받아와서 콘솔에 찍어와 주셔야 할 것 같아요!
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.
오! 그렇군요!! 반영 완료했습니다!
@@ -1,128 +1,7 @@ | |||
import reviewImage from '@assets/images/img_review_4.png'; // 이미지 import |
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.
아! 남기는 것으로 수정하겠습니당!! 오홍
복구 완료 했습니다! import는 불러오기는 이름이 중복되서 나중에 서버 끊기면 갈아끼우겠솜당~
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 { getReview, GetReviewResponse } from './getReview'; | ||
|
||
const useReviewQueries = ({ productId }: { productId: number }) => { | ||
const QUERY_KEY = { |
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.
이렇게 QUERY_KEY를 만들기도 하는군요!
관련 이슈 🛰️
작업 내용 🧑💻
알게된 점 🚀
깃허브 pr단에서 build에러를 잡을 수 있다는 것을 새롭게 알게되었습니다!
build에러도 확인하고 머지하겠습니당!!
스크린샷 📸
2024-11-29.1.04.51.mov