diff --git a/src/views/Conversations/ChatWindow.jsx b/src/views/Conversations/ChatWindow.jsx index 7583d8a..edd93ae 100644 --- a/src/views/Conversations/ChatWindow.jsx +++ b/src/views/Conversations/ChatWindow.jsx @@ -18,16 +18,7 @@ const { Sider, Content, Header, Footer } = Layout; * */ const ChatWindow = () => { - console.log('chat window;;;;;;;;;;;;;;;;;;;;;;;;'); - // const { order_sn } = useParams(); - // const { loginUser } = useAuthContext(); - // const { currentConversation } = useConversationStore(); - useEffect(() => { - console.log('chat window 222;;;;;;;;;;;;;;;;;;;;;;;;'); - - return () => {}; - }, []); const [collapsedLeft, setCollapsedLeft] = useState(false); const [collapsedRight, setCollapsedRight] = useState(false); @@ -40,7 +31,7 @@ const ChatWindow = () => { className='h-full overflow-y-auto' style={{ maxHeight: 'calc(100vh - 198px)', height: 'calc(100vh - 198px)' }} collapsible={true} - breakpoint='xxl' + breakpoint='xl' collapsedWidth={73} collapsed={collapsedLeft} onBreakpoint={(broken) => { @@ -76,7 +67,7 @@ const ChatWindow = () => { className=' overflow-y-auto' style={{ maxHeight: 'calc(100vh - 198px)', height: 'calc(100vh - 198px)' }} collapsible={true} - breakpoint='xxl' + breakpoint='xl' collapsedWidth={0} trigger={null} collapsed={collapsedRight}> diff --git a/src/views/Conversations/Components/ConversationsList.jsx b/src/views/Conversations/Components/ConversationsList.jsx index a83ea03..f0327f5 100644 --- a/src/views/Conversations/Components/ConversationsList.jsx +++ b/src/views/Conversations/Components/ConversationsList.jsx @@ -4,75 +4,22 @@ import { Button, Dropdown } from 'antd'; import { MoreOutlined } from '@ant-design/icons'; import { useAuthContext } from '@/stores/AuthContext'; import { fetchOrderConversationsList, fetchConversationItemClose, fetchMessages } from '@/actions/ConversationActions'; -import { ChatList, } from 'react-chat-elements'; +import { ChatList, ChatItem } from 'react-chat-elements'; import { isEmpty } from '@/utils/utils'; import useConversationStore from '@/stores/ConversationStore'; -const CDropdown = (props) => { - const { delConversationitem } = useConversationStore(); - - const handleConversationItemClose = async () => { - await fetchConversationItemClose({ conversationid: props.sn, opisn: props.opi_sn }); - delConversationitem(props); - }; - return ( - { - e.domEvent.stopPropagation(); - switch (e.key) { - case 'close': - return handleConversationItemClose(); - - default: - return; - } - }, - }}> -