|
1 | 1 | import React, { useState, useEffect } from 'react'; |
2 | | -import { Table, Ellipsis } from '@c-x/ui'; |
| 2 | +import { Table } from '@c-x/ui'; |
3 | 3 | import { getListChatRecord } from '@/api/Billing'; |
4 | | -import { aggregatedTime } from '@/utils'; |
5 | 4 | import dayjs from 'dayjs'; |
6 | | -import { convertTokensToRMB } from '@/utils'; |
7 | 5 |
|
8 | 6 | import Card from '@/components/card'; |
9 | | -import { Box, Stack, styled, Chip } from '@mui/material'; |
| 7 | +import { Box } from '@mui/material'; |
10 | 8 | import StyledLabel from '@/components/label'; |
11 | 9 |
|
12 | 10 | import ChatDetailModal from './chatDetailModal'; |
13 | 11 | import { ColumnsType } from '@c-x/ui/dist/Table'; |
14 | | -import { DomainChatRecord } from '@/api/types'; |
| 12 | +import { DomainChatRecord, DomainUser } from '@/api/types'; |
15 | 13 | import { addCommasToNumber } from '@/utils'; |
16 | | - |
17 | | -const StyledHighlightText = styled('span')(({ theme }) => ({ |
18 | | - color: theme.vars.palette.text.primary, |
19 | | - fontWeight: 700, |
20 | | -})); |
| 14 | +import User from '@/components/user'; |
21 | 15 |
|
22 | 16 | const Chat = () => { |
23 | 17 | const [page, setPage] = useState(1); |
@@ -47,9 +41,15 @@ const Chat = () => { |
47 | 41 | { |
48 | 42 | dataIndex: 'user', |
49 | 43 | title: '成员', |
50 | | - width: 160, |
51 | | - render(value: DomainChatRecord['user']) { |
52 | | - return value?.username; |
| 44 | + width: 260, |
| 45 | + render(value: DomainUser) { |
| 46 | + return ( |
| 47 | + <User |
| 48 | + id={value.id!} |
| 49 | + username={value.username!} |
| 50 | + email={value.email!} |
| 51 | + /> |
| 52 | + ); |
53 | 53 | }, |
54 | 54 | }, |
55 | 55 | { |
|
0 commit comments