import { FileImageOutlined, MessageOutlined, PlusOutlined, ShareAltOutlined, SmileOutlined, MessageTwoTone } from '@ant-design/icons' import { Avatar, Button, Card, Input, Popover, Tabs, message, Upload, Image } from 'antd' import { useEffect, useState } from 'react' import { fetchCircleList, saveMoment, getMoments } from './service' import CommentList from './comps/comment-list' import './index.less' const { Meta } = Card const { TextArea } = Input const Circle = () => { const userInfoStorage = localStorage.getItem('userInfo') const { tokenValue = '' } = userInfoStorage ? JSON.parse(userInfoStorage) : {} const [hasFocus, setHasFocus] = useState(false) const [comment, setComment] = useState('') const [circleList, setCircleList] = useState([]) const [currentSelectCircle, setCurrentSelectCircle] = useState(null) const [openFlag, setOpenFlag] = useState(false) const [imgList, setImgList] = useState([]) const [momentList, setMomentList] = useState([]) const [currentReplyCommentId, setCurrentReplyCommentId] = useState(undefined) const [previewList, setPreviewList] = useState({ list: [], index: 0 }) const toggleFocus = (flag: boolean) => { setHasFocus(!flag) } const onChange = e => { setComment(e.target.value) } const getCircleList = async () => { const res = await fetchCircleList() if (res.success && res.data?.length > 0) { setCircleList(res.data) } } useEffect(() => { getCircleList() getMomentList() }, []) const changeCircle = selectItem => { setCurrentSelectCircle(selectItem) setOpenFlag(false) } const renderTab = () => { return circleList.map(item => { return { label: item.circleName, key: item.id, children: (