Skip to content

Commit

Permalink
fix: 게스트 매치 생성 페이지 validation 수정
Browse files Browse the repository at this point in the history
  • Loading branch information
imb96 committed Dec 1, 2023
1 parent 781f2fe commit 8d77e62
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
1 change: 0 additions & 1 deletion src/ConnectSSE.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,6 @@ const invalidateCrewQueries = (
queryClient: QueryClient,
newCrewAlarm: CrewAlarm
) => {

if (newCrewAlarm.crewAlarmMessage === '크루 가입 수락을 기다리고 있어요') {
queryClient.invalidateQueries({
queryKey: ['crew-members', newCrewAlarm.crewId, '대기'],
Expand Down
13 changes: 7 additions & 6 deletions src/pages/CreateGamePage/useCreateGamePage.ts
Original file line number Diff line number Diff line change
Expand Up @@ -139,20 +139,21 @@ export const useCreateGamePage = () => {
playYear > currentYear ||
(playYear >= currentYear && playMonth > currentMonth) ||
(playYear >= currentYear &&
playMonth > currentMonth &&
playMonth >= currentMonth &&
playDay > currentDay)
) {
return true;
}

if (
Number(playStartTimeHours) <= currentHours ||
(Number(playStartTimeHours) <= currentHours &&
Number(playStartTimeMinutes) <= currentMinutes)
Number(playStartTimeHours) > currentHours ||
(Number(playStartTimeHours) >= currentHours &&
Number(playStartTimeMinutes) > currentMinutes)
) {
return false;
return true;
}

return true;
return false;
};

return {
Expand Down

0 comments on commit 8d77e62

Please sign in to comment.