import React, { useEffect, useRef } from 'react'; import { Link } from 'react-router-dom'; import { closeChat, toggleChat, } from 'soapbox/actions/chats'; import HoverRefWrapper from 'soapbox/components/hover_ref_wrapper'; import IconButton from 'soapbox/components/icon_button'; import { Avatar, HStack, Counter, Icon, Stack, Text } from 'soapbox/components/ui'; import VerificationBadge from 'soapbox/components/verification_badge'; import { useAppSelector, useAppDispatch } from 'soapbox/hooks'; import { IChat } from 'soapbox/queries/chats'; import { makeGetChat } from 'soapbox/selectors'; import { getAcct } from 'soapbox/utils/accounts'; import { displayFqn as getDisplayFqn } from 'soapbox/utils/state'; import ChatBox from './chat-box'; import ChatPaneHeader from './chat-pane-header'; import { Pane, WindowState } from './ui'; import type { Account as AccountEntity } from 'soapbox/types/entities'; const getChat = makeGetChat(); interface IChatWindow { chat: IChat closeChat(): void closePane(): void } /** Floating desktop chat window. */ const ChatWindow: React.FC = ({ chat, closeChat, closePane }) => { if (!chat) return null; return ( <>
{chat.account.display_name} {chat.account.verified && }
{chat.account.acct}
} isToggleable={false} isOpen onToggle={closePane} /> null} /> // // // {unreadCount > 0 ? unreadIcon : avatar } // //
// //
//
//
// //
//
); }; export default ChatWindow;