From 9c34c00f2cc0825433f342e942d6eaf805fe9c28 Mon Sep 17 00:00:00 2001 From: Deveshi Dwivedi Date: Sat, 22 Jun 2024 19:43:30 +0530 Subject: [PATCH] create room issue resolved --- modules/home/components/Home.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/home/components/Home.tsx b/modules/home/components/Home.tsx index b5f3606..549dd3b 100644 --- a/modules/home/components/Home.tsx +++ b/modules/home/components/Home.tsx @@ -33,12 +33,12 @@ const Home = () => { openModal() } }; - + socket.on("created", handleCreated); socket.on("joined", handleJoinedRoom); return () => { - socket.off("created"); + socket.off("created", handleCreated); socket.off("joined", handleJoinedRoom); }; }, [openModal, roomId, router, setAtomRoomId]);