Merge remote-tracking branch 'origin/main' into dev/chat
commit
dd267e1223
@ -1,7 +0,0 @@
|
|||||||
import { createContext, useContext } from 'react'
|
|
||||||
|
|
||||||
export const AuthContext = createContext({})
|
|
||||||
|
|
||||||
export function useAuthContext() {
|
|
||||||
return useContext(AuthContext)
|
|
||||||
}
|
|
@ -0,0 +1,85 @@
|
|||||||
|
import { memo, useCallback, useEffect, useRef, useState, forwardRef } from 'react';
|
||||||
|
import { Avatar, List, Button, Input, Layout, Select, DatePicker, Form, Spin } from 'antd';
|
||||||
|
import { ChatItem, MessageBox } from 'react-chat-elements';
|
||||||
|
import { fetchConversationsList, fetchMessages, MESSAGE_PAGE_SIZE } from '@/actions/ConversationActions';
|
||||||
|
import { isEmpty } from '@/utils/utils';
|
||||||
|
import useFormStore from '@/stores/FormStore';
|
||||||
|
import { useShallow } from 'zustand/react/shallow';
|
||||||
|
|
||||||
|
|
||||||
|
import { RightOutlined } from '@ant-design/icons'
|
||||||
|
|
||||||
|
import { fetchSalesAgent, fetchCustomerList } from '@/actions/CommonActions';
|
||||||
|
import SearchInput from '@/components/SearchInput';
|
||||||
|
|
||||||
|
const { Sider, Content, Header, Footer } = Layout;
|
||||||
|
const { Search } = Input;
|
||||||
|
const { RangePicker } = DatePicker;
|
||||||
|
|
||||||
|
const data = [
|
||||||
|
{
|
||||||
|
title: 'Tyler Dru Kelly',
|
||||||
|
avatarUrl: 'https://api.dicebear.com/7.x/miniavs/svg?seed=' + Math.random() * 10000,
|
||||||
|
msgTime: '15127570944',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: 'Chhavi',
|
||||||
|
avatarUrl: 'https://api.dicebear.com/7.x/miniavs/svg?seed=' + Math.random() * 10000,
|
||||||
|
msgTime: 'WLJ240311112',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: 'Nathan Posey',
|
||||||
|
avatarUrl: 'https://api.dicebear.com/7.x/miniavs/svg?seed=' + Math.random() * 10000,
|
||||||
|
msgTime: 'WLJ240311114',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: 'Philip',
|
||||||
|
avatarUrl: 'https://api.dicebear.com/7.x/miniavs/svg?seed=' + Math.random() * 10000,
|
||||||
|
msgTime: 'WLJ240312062',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: 'Jeanne',
|
||||||
|
avatarUrl: 'https://api.dicebear.com/7.x/miniavs/svg?seed=' + Math.random() * 10000,
|
||||||
|
msgTime: 'H240313032',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: 'Susan Puls',
|
||||||
|
avatarUrl: 'https://api.dicebear.com/7.x/miniavs/svg?seed=' + Math.random() * 10000,
|
||||||
|
msgTime: 'H240311213',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: 'Ana Beatriz',
|
||||||
|
avatarUrl: 'https://api.dicebear.com/7.x/miniavs/svg?seed=' + Math.random() * 10000,
|
||||||
|
msgTime: 'H240312073',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: 'Kathleen Anne Workman',
|
||||||
|
avatarUrl: 'https://api.dicebear.com/7.x/miniavs/svg?seed=' + Math.random() * 10000,
|
||||||
|
msgTime: 'HXY240104171',
|
||||||
|
},
|
||||||
|
]
|
||||||
|
|
||||||
|
function Login() {
|
||||||
|
return (
|
||||||
|
<>
|
||||||
|
<List
|
||||||
|
itemLayout='horizontal'
|
||||||
|
dataSource={data}
|
||||||
|
renderItem={(item, index) => (
|
||||||
|
<List.Item
|
||||||
|
actions={[<RightOutlined key='goto' />]}
|
||||||
|
>
|
||||||
|
<List.Item.Meta
|
||||||
|
avatar={<Avatar src={item.avatarUrl} />}
|
||||||
|
title={<a href='https://ant.design'>{item.title}</a>}
|
||||||
|
description={item.msgTime}
|
||||||
|
/>
|
||||||
|
</List.Item>
|
||||||
|
|
||||||
|
)}
|
||||||
|
/>
|
||||||
|
</>
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
export default Login;
|
Loading…
Reference in New Issue