拆分reducer; 整理目录
parent
4552d0ad58
commit
2b6cf70f48
@ -1,4 +1,4 @@
|
||||
import initialState from '@/stores/Conversations/initialState';
|
||||
import initialState from '@/records/ConversationState';
|
||||
|
||||
const NAME_SPACE = 'CONVERSATION/';
|
||||
|
@ -0,0 +1,27 @@
|
||||
import { createContext, useContext, useEffect, useState } from 'react';
|
||||
import { useConversationState } from '@/stores/ConversationContext';
|
||||
|
||||
import { Flex, Typography, Avatar } from 'antd';
|
||||
import LocalTimeClock from './LocalTimeClock';
|
||||
|
||||
const MessagesHeader = () => {
|
||||
const { currentConversation } = useConversationState();
|
||||
return (
|
||||
<>
|
||||
<Flex gap={16}>
|
||||
{currentConversation.customer_name && <Avatar src={`https://api.dicebear.com/7.x/avataaars/svg?seed=${currentConversation.customer_name}`} />}
|
||||
<Flex flex={'1'} justify='space-between'>
|
||||
<Flex vertical={true} justify='space-between'>
|
||||
<Typography.Text strong>{currentConversation.customer_name}</Typography.Text>
|
||||
<Typography.Text>{currentConversation.whatsapp_phone_number}</Typography.Text>
|
||||
</Flex>
|
||||
<Flex vertical={true} justify='space-between'>
|
||||
<Typography.Text>{/* <LocalTimeClock /> <Typography.Text strong>{order?.location} </Typography.Text> */}</Typography.Text>
|
||||
{/* <Typography.Text>{customerDateTime}</Typography.Text> */}
|
||||
</Flex>
|
||||
</Flex>
|
||||
</Flex>
|
||||
</>
|
||||
);
|
||||
};
|
||||
export default MessagesHeader;
|
Loading…
Reference in New Issue