diff --git a/src/App.tsx b/src/App.tsx index 7012a198..c0fd3dc3 100644 --- a/src/App.tsx +++ b/src/App.tsx @@ -125,6 +125,16 @@ export default function App() { } }, [showSnackbar]) + useEffect(() => { + const handleWebsockets = (e: any) => { + showSnackbar('info', 'Scene activated: ' + e.detail.scene_id) + } + document.addEventListener('scene_activated', handleWebsockets) + return () => { + document.removeEventListener('scene_activated', handleWebsockets) + } + }, [showSnackbar]) + useEffect(() => { if (protoCall !== '') { // showSnackbar('info', `External call: ${protoCall}`)