Open source video conferencing app powered by LiveKit. Built with Django and React.
🩹(frontend) dismiss notification toasts on room disconnect
lebaudantoine5b282b62e7a5
diff --git a/src/frontend/src/features/notifications/MainNotificationToast.tsx b/src/frontend/src/features/notifications/MainNotificationToast.tsxindex 50739f78..0ff7a526 100644--- a/src/frontend/src/features/notifications/MainNotificationToast.tsx+++ b/src/frontend/src/features/notifications/MainNotificationToast.tsx@@ -93,6 +93,16 @@ export const MainNotificationToast = () => {}}, [room, triggerNotificationSound])+ useEffect(() => {+ const closeAllToasts = () => {+ toastQueue.visibleToasts.forEach(({ key }) => toastQueue.close(key))+ }+ room.on(RoomEvent.Disconnected, closeAllToasts)+ return () => {+ room.off(RoomEvent.Disconnected, closeAllToasts)+ }+ }, [room])+return (<Div position="absolute" bottom={20} right={5} zIndex={1000}><ToastProvider />