-
Notifications
You must be signed in to change notification settings - Fork 47
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
전남대 FE_이도현 4주차 과제 #69
base: leedyun
Are you sure you want to change the base?
Conversation
src/pages/Product/index.tsx
Outdated
|
||
const fetchProductDetails = async (productId: string) => { | ||
try { | ||
const response = await axios.get(`https://kakao-tech-campus-mock-server.vercel.app/api/v1/products/${productId}/detail`); |
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 의 base url 은 axios instance 를 생성해서 baseUrl 지정해주는게 좋을거 같습니다.
ref. https://axios-http.com/docs/config_defaults
// e.g.
axios.create({
baseURL: 'https://kakao-tech-campus-mock-server.vercel.app'
});
}, [productId]); | ||
|
||
const handleGiftToSelf = () => { | ||
const authToken = authSessionStorage.get(); |
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.
authToken 을 handleGiftToSelf 에서 체크해주는 이유가 있을까요 ?
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.
로그인 여부를 체크하기 위해 사용했습니다. 혹시 다른 더 좋은 방법이 있을까요?
eslint 제대로 적용되었는지 확인 부탁드려요 ~! |
안녕하세요 멘토님. 피드백 주신 코드와 추가적으로 빠뜨린 코드 수정했습니다. 감사합니다. |
안녕하세요 멘토님. 이번주에 바쁜 일이 있어서 각 단계별로 풀리퀘스트 하지 못하고 커밋을 상세하게 하지 못한 점 양해 부탁드립니다. 피드백 주시면 열심히 수정하도록 하겠습니다. 감사합니다.