diff --git a/app/soapbox/features/chats/components/chat-widget.tsx b/app/soapbox/features/chats/components/chat-widget.tsx index c403274ed..bd72f1e02 100644 --- a/app/soapbox/features/chats/components/chat-widget.tsx +++ b/app/soapbox/features/chats/components/chat-widget.tsx @@ -1,26 +1,16 @@ -import React, { useEffect } from 'react'; +import React from 'react'; -import { connectDirectStream } from 'soapbox/actions/streaming'; import { ChatProvider } from 'soapbox/contexts/chat-context'; -import { useAppDispatch, useOwnAccount } from 'soapbox/hooks'; +import { useOwnAccount } from 'soapbox/hooks'; import ChatPane from './chat-pane/chat-pane'; const ChatWidget = () => { const account = useOwnAccount(); - const dispatch = useAppDispatch(); const path = location.pathname; const shouldHideWidget = Boolean(path.match(/^\/chats/)); - useEffect(() => { - const disconnect = dispatch(connectDirectStream()); - - return (() => { - disconnect(); - }); - }, []); - if (!account?.chats_onboarded || shouldHideWidget) { return null; }