|
|
|
@ -1,5 +1,5 @@
|
|
|
|
|
import { useEffect, useState } from 'react';
|
|
|
|
|
import { observer } from 'mobx-react';
|
|
|
|
|
import { useParams, useNavigate } from "react-router-dom";
|
|
|
|
|
import { Layout, List, Avatar, Flex, Typography, Spin } from 'antd';
|
|
|
|
|
import Messages from './Components/Messages';
|
|
|
|
|
import InputBox from './Components/InputBox';
|
|
|
|
@ -20,11 +20,14 @@ const { Sider, Content, Header, Footer } = Layout;
|
|
|
|
|
/**
|
|
|
|
|
*
|
|
|
|
|
*/
|
|
|
|
|
const ChatWindow = observer(() => {
|
|
|
|
|
const ChatWindow = (() => {
|
|
|
|
|
const { order_id } = useParams();
|
|
|
|
|
const { loginUser: currentUser } = useAuthContext();
|
|
|
|
|
const { errors, sendMessage, currentConversation, customerOrderProfile: orderInfo } = useConversationContext();
|
|
|
|
|
const { quotes, contact, last_contact, ...order } = orderInfo;
|
|
|
|
|
|
|
|
|
|
console.log(order_id, currentUser);
|
|
|
|
|
|
|
|
|
|
return (
|
|
|
|
|
<Spin spinning={false} tip={'正在连接...'} >
|
|
|
|
|
<Layout className='full-height h-full chatwindow-wrapper' style={{ maxHeight: 'calc(100% - 198px)', height: 'calc(100% - 198px)' }}>
|
|
|
|
|