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

전남대 FE_이도현 4주차 과제 #69

Open
wants to merge 15 commits into
base: leedyun
Choose a base branch
from

Conversation

leedyun
Copy link

@leedyun leedyun commented Jul 19, 2024

안녕하세요 멘토님. 이번주에 바쁜 일이 있어서 각 단계별로 풀리퀘스트 하지 못하고 커밋을 상세하게 하지 못한 점 양해 부탁드립니다. 피드백 주시면 열심히 수정하도록 하겠습니다. 감사합니다.


const fetchProductDetails = async (productId: string) => {
try {
const response = await axios.get(`https://kakao-tech-campus-mock-server.vercel.app/api/v1/products/${productId}/detail`);

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

Choose a reason for hiding this comment

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

authToken 을 handleGiftToSelf 에서 체크해주는 이유가 있을까요 ?

Copy link
Author

Choose a reason for hiding this comment

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

로그인 여부를 체크하기 위해 사용했습니다. 혹시 다른 더 좋은 방법이 있을까요?

@tlsehdfl
Copy link

eslint 제대로 적용되었는지 확인 부탁드려요 ~!

@leedyun
Copy link
Author

leedyun commented Jul 20, 2024

안녕하세요 멘토님. 피드백 주신 코드와 추가적으로 빠뜨린 코드 수정했습니다. 감사합니다.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants