전남대 FE_이도현 4주차 과제#69
Open
leedyun wants to merge 15 commits intokakao-tech-campus-2nd-step2:leedyunfrom
Open
Conversation
added 11 commits
July 18, 2024 00:51
tlsehdfl
reviewed
Jul 20, 2024
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.
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.
authToken 을 handleGiftToSelf 에서 체크해주는 이유가 있을까요 ?
Author
There was a problem hiding this comment.
로그인 여부를 체크하기 위해 사용했습니다. 혹시 다른 더 좋은 방법이 있을까요?
|
eslint 제대로 적용되었는지 확인 부탁드려요 ~! |
Author
|
안녕하세요 멘토님. 피드백 주신 코드와 추가적으로 빠뜨린 코드 수정했습니다. 감사합니다. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
안녕하세요 멘토님. 이번주에 바쁜 일이 있어서 각 단계별로 풀리퀘스트 하지 못하고 커밋을 상세하게 하지 못한 점 양해 부탁드립니다. 피드백 주시면 열심히 수정하도록 하겠습니다. 감사합니다.