import React, { useEffect, useState } from 'react'; import { Space, Select, Input, Button, Typography, Spin } from '@arco-design/web-react'; import { IconDownload, IconFaceSmileFill } from '@arco-design/web-react/icon'; import axios from 'axios'; import MessageList from './message-list'; import styles from './style/index.module.less'; import useLocale from '../../utils/useLocale'; export default function ChatPanel() { const locale = useLocale(); const [messageList, setMessageList] = useState([]); const [loading, setLoading] = useState(false); function fetchMessageList() { setLoading(true); axios .get('/api/chatList') .then((res) => { setMessageList(res.data || []); }) .finally(() => { setLoading(false); }); } useEffect(() => { fetchMessageList(); }, []); return (
{locale['monitor.title.chatPanel']}
} />
); }