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

템플릿 목록 조회, 상세 조회, 생성 요청 로직 리펙토링 #110

Merged
merged 18 commits into from
Jul 24, 2024

Conversation

Hain-tain
Copy link
Contributor

@Hain-tain Hain-tain commented Jul 24, 2024

⚡️ 관련 이슈

close #103

📍주요 변경 사항

1. dotenv 설치 및 webpack 설정 추가

2. endPoint 상수화 및 api 요청 함수 별도로 분리(api/templates) 및 테스트 작성

3. UploadsTemplate => TemplateUpload 로 변경

4. 응답 json 객체 키 카멜케이스로 변경

5. msw browser 설정

🎸기타

  • 지금부터 .env 파일 설정해주셔야합니다!
REACT_APP_API_URL='서버주소'

@Hain-tain Hain-tain added FE 프론트엔드 refactor 요구사항이 바뀌지 않은 변경사항 zap 리뷰 우선순위가 높은 사항 labels Jul 24, 2024
@Hain-tain Hain-tain added this to the 2차 스프린트 🐣 milestone Jul 24, 2024
@Hain-tain Hain-tain self-assigned this Jul 24, 2024
vi-wolhwa
vi-wolhwa previously approved these changes Jul 24, 2024
frontend/src/api/templates.ts Outdated Show resolved Hide resolved
frontend/src/api/customFetch.ts Show resolved Hide resolved
frontend/src/hooks/useTemplateListQuery.ts Show resolved Hide resolved
Copy link
Contributor

@Jaymyong66 Jaymyong66 left a comment

Choose a reason for hiding this comment

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

간단한 코멘트 남겼어요. 고생하셨슴다

@@ -0,0 +1,4 @@
export const QUERY_KEY = {
Copy link
Contributor

Choose a reason for hiding this comment

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

키를 쓸 때 Symbol 데이터 타입을 고려해봐도 좋겠네요!

Comment on lines 3 to 5
export const END_POINT = {
TEMPLATES: '/templates',
};
Copy link
Contributor

Choose a reason for hiding this comment

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

당장은 이렇게 파일을 분리하지 않고, templates.ts 파일을 분리한다면 관련 엔드포인트도 해당 파일에 모아두는 것도 방법일 것 같아요~!

Comment on lines +28 to +31
await waitFor(() => {
expect(result.current.isSuccess).toBe(true);
});
});
Copy link
Contributor

Choose a reason for hiding this comment

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

추후에 isSuccess가 true인지 확인 + 실제 데이터가 들어갔는지 확인해도 좋을 것 같아요.

@Jaymyong66 Jaymyong66 merged commit 020b8d8 into woowacourse-teams:dev/fe Jul 24, 2024
1 check passed
@Hain-tain Hain-tain deleted the refactor/templates_api branch July 24, 2024 06:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
FE 프론트엔드 refactor 요구사항이 바뀌지 않은 변경사항 zap 리뷰 우선순위가 높은 사항
Projects
Status: Weekend Done
Development

Successfully merging this pull request may close these issues.

3 participants