Skip to content

Commit

Permalink
feat: 플레이어들의 준비 여부를 확인하는 useReadyStatus 훅 구현
Browse files Browse the repository at this point in the history
  • Loading branch information
zizonyoungjun committed Dec 1, 2024
1 parent c847387 commit 314ca93
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions packages/frontend/src/hooks/useReadyStatus.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
import { useGameSocket } from '@/hooks/useGameSocket';

export const useReadyStatus = () => {
const { readyUsers } = useGameSocket();

const isUserReady = (userId: string) => readyUsers.includes(userId);

return { isUserReady };
};

0 comments on commit 314ca93

Please sign in to comment.