You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
시간 계산 로직
기존의 시간 계산 로직은 startDate를 Date.now()와 비교했었는데, 문제 등록 폼이 시간을 받지 않기 때문에 Date.now()와 비교해서는 안됐습니다. 날짜까지만 입력받는 문제 등록 폼의 맥락에 맞게 date-fns의 isBefore로 내일 날짜와 비교하도록 수정했습니다. (12/29 기준, startDate >= 12/30면 대기중인 문제 탭으로 이동)
queryKey 컨벤션 누락 query 부분은 ["queuedProblem", groupId] 와 같이 옛날 방식으로 작성된 queryKey를 사용하고 있는 반면, mutation에서는 queryKey 컨벤션인 groupQueryKey를 사용하고 있습니다. 이에 따른 둘 간의 불일치로 인해 문제를 등록해도 invalidate하지 못하는 일이 발생하고 있었습니다. 그래서 잘 수정했습니다.
페이지네이션 searchParam 적용 usePaginationQuery에 queryKey 컨벤션을 적용함에 따라 페이지네이션 용 searchParam이 groupQueryKey의 0번 인덱스인 group으로 적용되므로 각각에 맞는 searchParam을 따로 적용해 주었습니다.
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
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.
✅ Done Task
☀️ New-insight
💎 PR Point
시간 계산 로직
기존의 시간 계산 로직은
startDate를Date.now()와 비교했었는데, 문제 등록 폼이 시간을 받지 않기 때문에Date.now()와 비교해서는 안됐습니다. 날짜까지만 입력받는 문제 등록 폼의 맥락에 맞게date-fns의isBefore로 내일 날짜와 비교하도록 수정했습니다. (12/29 기준,startDate >= 12/30면 대기중인 문제 탭으로 이동)queryKey 컨벤션 누락
query부분은["queuedProblem", groupId]와 같이 옛날 방식으로 작성된queryKey를 사용하고 있는 반면,mutation에서는queryKey컨벤션인groupQueryKey를 사용하고 있습니다. 이에 따른 둘 간의 불일치로 인해 문제를 등록해도invalidate하지 못하는 일이 발생하고 있었습니다. 그래서 잘 수정했습니다.페이지네이션 searchParam 적용
usePaginationQuery에queryKey컨벤션을 적용함에 따라 페이지네이션 용searchParam이groupQueryKey의 0번 인덱스인group으로 적용되므로 각각에 맞는 searchParam을 따로 적용해 주었습니다.📸 Screenshot