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

악시오스 세팅 + 리액트 쿼리 테스트 api 구축 #51

Merged
merged 4 commits into from
Oct 16, 2024

Conversation

rhehfl
Copy link
Collaborator

@rhehfl rhehfl commented Oct 16, 2024

🔗 관련 이슈

#30

📝작업 내용

인터셉터는 추후에 백엔드의 상태 코드별 에러 메세지나 토큰 로직을 추가할때 같이 추가하도록 하겠습니다.
리액트 쿼리를 좀 더 간결하게 사용할 수 있게 apis/quiz에 테스트 api코드를 만들었습니다

🔍 변경 사항

  • axios instance 추가
  • intercepter 생성
  • react query test api 추가

💬리뷰 요구사항 (선택사항)

@rhehfl rhehfl added the 📬 API 서버 API 통신 label Oct 16, 2024
@rhehfl rhehfl self-assigned this Oct 16, 2024
@rhehfl rhehfl linked an issue Oct 16, 2024 that may be closed by this pull request
3 tasks
export default function Main() {
const { data: quizzes, isLoading } = QUIZ.getQuizzes(1, 'EASY');
if (isLoading) return <div>asdasdasd</div>;
console.log(quizzes);
Copy link
Collaborator

Choose a reason for hiding this comment

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

의미없는 console.log지우고 올리는 습관을 들이느게 좋을 것 같습니다.
같은 팀원은 PR에서 console.log여부에 대해 잡아줘도 좋을 것 같아요.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

확인했습니다

@rhehfl
Copy link
Collaborator Author

rhehfl commented Oct 16, 2024

 const { data: quizzes, isLoading } = QUIZ.getQuizzes(1, 'EASY');
  if (isLoading) return <div>asdasdasd</div>;
  console.log(quizzes);

이런 형식으로 데이터를 가져올 수 있습니다

@bluetree7878
Copy link
Collaborator

리액트쿼리 예제도 확인해 볼 수 있어서 너무 좋네요! 악시오스 세팅도 미니때처럼 깔끔하게 하셔서 잘 쓸 수 있을 것 같습니다. ㅎㅎ

@rhehfl rhehfl merged commit 17aae57 into develop Oct 16, 2024
@rhehfl rhehfl deleted the API/#30/Axios_Setting branch October 16, 2024 08:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
📬 API 서버 API 통신
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Axios Setting
3 participants