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_이도현 6주차 과제 #111

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

Conversation

leedyun
Copy link

@leedyun leedyun commented Aug 4, 2024

6주차 과제 제출합니다..

},
});

instance.interceptors.request.use((config) => {
Copy link

Choose a reason for hiding this comment

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

interceptor 선언을 해당 훅에 선언한 이유가 있나요 ? 공통으로 적용되는 부분이기 때문에 api/index.ts 같은 곳에 선언하면 될 거 같아요.


export type GoodsDetailResponseData = ProductData;

export const getProductDetailPath = (productId: string) => `${BASE_URL}/api/products/${productId}`;
Copy link

Choose a reason for hiding this comment

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

baseUrl 을 axios instance 에 공통으로 선언하면 base url 을 한 곳에서만 선언하면 됩니다.

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