|
|
@ -2,11 +2,12 @@ import React, { useEffect } from 'react';
|
|
|
|
|
|
|
|
|
|
|
|
import { connectDirectStream } from 'soapbox/actions/streaming';
|
|
|
|
import { connectDirectStream } from 'soapbox/actions/streaming';
|
|
|
|
import { ChatProvider } from 'soapbox/contexts/chat-context';
|
|
|
|
import { ChatProvider } from 'soapbox/contexts/chat-context';
|
|
|
|
import { useAppDispatch } from 'soapbox/hooks';
|
|
|
|
import { useAppDispatch, useOwnAccount } from 'soapbox/hooks';
|
|
|
|
|
|
|
|
|
|
|
|
import ChatPane from './chat-pane/chat-pane';
|
|
|
|
import ChatPane from './chat-pane/chat-pane';
|
|
|
|
|
|
|
|
|
|
|
|
const ChatWidget = () => {
|
|
|
|
const ChatWidget = () => {
|
|
|
|
|
|
|
|
const account = useOwnAccount();
|
|
|
|
const dispatch = useAppDispatch();
|
|
|
|
const dispatch = useAppDispatch();
|
|
|
|
|
|
|
|
|
|
|
|
useEffect(() => {
|
|
|
|
useEffect(() => {
|
|
|
@ -17,6 +18,10 @@ const ChatWidget = () => {
|
|
|
|
});
|
|
|
|
});
|
|
|
|
}, []);
|
|
|
|
}, []);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (!account?.chats_onboarded) {
|
|
|
|
|
|
|
|
return null;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
return (
|
|
|
|
return (
|
|
|
|
<ChatProvider>
|
|
|
|
<ChatProvider>
|
|
|
|
<ChatPane />
|
|
|
|
<ChatPane />
|
|
|
|