Skip to content

Commit

Permalink
[front] denyされた後に listener を解除した
Browse files Browse the repository at this point in the history
otherwise 関数が deny された回数呼び出される
  • Loading branch information
kotto5 committed Feb 26, 2024
1 parent b6264bb commit e73e073
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions frontend/app/lib/hooks/useRequestMatch.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ export const useRequestMatch = (userId: number) => {

const handleDenyMatchRequest = useCallback(() => {
setIsRequestingMatch(false);
socket.off("denied-match-request", handleDenyMatchRequest);
}, [userId]);
const requestMatch = useCallback(async () => {
setSendRequestPending(true);
Expand Down

0 comments on commit e73e073

Please sign in to comment.