diff --git a/frontend/app/lib/client-socket-provider.tsx b/frontend/app/lib/client-socket-provider.tsx index a2f36ff3..4c03fd2c 100644 --- a/frontend/app/lib/client-socket-provider.tsx +++ b/frontend/app/lib/client-socket-provider.tsx @@ -121,7 +121,7 @@ export default function SocketProvider() { } else if ( event === "delete-room" || event === "enter-room" || - event === "leave" || + event === "leave-room" || event === "mute" || event === "unmute" || event === "update-role" diff --git a/frontend/app/lib/hooks/useKick.ts b/frontend/app/lib/hooks/useKick.ts index 50f1375a..a6c5f0d5 100644 --- a/frontend/app/lib/hooks/useKick.ts +++ b/frontend/app/lib/hooks/useKick.ts @@ -40,9 +40,9 @@ export function useKick(roomId: number, userId: number, meId: number) { ); useEffect(() => { - socket.on("leave", handleLeaveRoomEvent); + socket.on("leave-room", handleLeaveRoomEvent); return () => { - socket.off("leave", handleLeaveRoomEvent); + socket.off("leave-room", handleLeaveRoomEvent); }; }, [handleLeaveRoomEvent]);