From ebcb0fcc7e1bb811e810744ace4352e456a6d5d3 Mon Sep 17 00:00:00 2001 From: Igor Loskutov Date: Thu, 19 Jun 2025 12:23:41 -0400 Subject: [PATCH] fix leaving the room redirect afte whereby client-side fix --- www/app/[roomName]/page.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/www/app/[roomName]/page.tsx b/www/app/[roomName]/page.tsx index d8386834..821c7a52 100644 --- a/www/app/[roomName]/page.tsx +++ b/www/app/[roomName]/page.tsx @@ -197,14 +197,14 @@ export default function Room(details: RoomDetails) { }, [isLoading, meeting?.error]); useEffect(() => { - if (isLoading || !isAuthenticated || !roomUrl) return; + if (isLoading || !isAuthenticated || !roomUrl || !wherebyLoaded) return; wherebyRef.current?.addEventListener("leave", handleLeave); return () => { wherebyRef.current?.removeEventListener("leave", handleLeave); }; - }, [handleLeave, roomUrl, isLoading, isAuthenticated]); + }, [handleLeave, roomUrl, isLoading, isAuthenticated, wherebyLoaded]); if (isLoading) { return (