diff --git a/src/components/App/index.tsx b/src/components/App/index.tsx index 8023691f8..5ac57af4f 100644 --- a/src/components/App/index.tsx +++ b/src/components/App/index.tsx @@ -237,6 +237,32 @@ export const App = () => { handleAiSummaryAudio, ]) + useEffect(() => { + const ws = new WebSocket('wss://staging.stakwork.com/cable') + + ws.onopen = () => { + console.log('WebSocket connection established') + } + + ws.onmessage = (event) => { + console.log('Message from server:', event.data) + // Handle the message from the server here + } + + ws.onerror = (error) => { + console.error('WebSocket error:', error) + } + + ws.onclose = () => { + console.log('WebSocket connection closed') + } + + // Cleanup when the component is unmounted + return () => { + ws.close() + } + }, []) + useEffect(() => { if (!splashDataLoading) { setUniverseQuestionIsOpen()