-
Notifications
You must be signed in to change notification settings - Fork 15
refactor(fe): use tanstack query for client-side data fetching #2232
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
Merged
Conversation
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
eunnbi
commented
Nov 22, 2024
apps/frontend/app/(client)/(code-editor)/_components/EditorHeader/EditorHeader.tsx
Show resolved
Hide resolved
eunnbi
commented
Nov 22, 2024
apps/frontend/app/(client)/(code-editor)/_components/ContestProblemDropdown.tsx
Show resolved
Hide resolved
Contributor
Author
|
리뷰하다가 궁금한 거 있으면 코멘트로 달아주세요~~ |
Contributor
Kimhyojung0810
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM🔥🔥🔥🔥
Kimhyojung0810
approved these changes
Nov 25, 2024
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.
Description
apis폴더safeFetcher(WithAuth)를 사용해야 합니다.queries폴더RegisterButton컴포넌트 리팩토링 (useEffect-> Tanstack Query)useQueryoruseSuspenseQuery사용해 리팩토링useQuery혹은useSuspenseQuery를 사용할지 결정해야 하는데, 이건 컴포넌트가 별도의 loading UI를 보여줘야 하냐 마냐에 따라서 결정될 수 있는 거라서 간단하게 쿼리 옵션만 관리하는 방법을 선택했습니다.Minor changes
page.tsx와layout.tsx에 제공하는 params prop의 프로퍼티 타입들은 무조건 string 입니다!!string인데number로 선언되어 있는 부분들이 꽤 있는 것 같은데 다 수정하진 않았어요... 잘못된 타입 선언으로 인해 쿼리 키가 일치하지 않아서 삽질했습니다... 😢 (["contest", 74, "problem", "list"] !== ["contest", "74", "problem", "list"])Additional context
Before submitting the PR, please make sure you do the following
fixes #123).