Commit 68e9334c by weiw

fix:处理页面显示数据的问题

parent b1c68e3f
...@@ -20,7 +20,6 @@ import { setIsAsking } from '@/store/chatSlice' ...@@ -20,7 +20,6 @@ import { setIsAsking } from '@/store/chatSlice'
import SdreamLoading from '@/components/SdreamLoading' import SdreamLoading from '@/components/SdreamLoading'
export const Chat: React.FC = () => { export const Chat: React.FC = () => {
let ignore = false
const { id } = useParams<{ id: string }>() const { id } = useParams<{ id: string }>()
const [isLoading, setIsLoading] = useState(false) const [isLoading, setIsLoading] = useState(false)
const [allItems, setAllItems] = useState<ChatRecord[]>([]) const [allItems, setAllItems] = useState<ChatRecord[]>([])
...@@ -188,12 +187,7 @@ export const Chat: React.FC = () => { ...@@ -188,12 +187,7 @@ export const Chat: React.FC = () => {
useEffect(() => { useEffect(() => {
if (id) { if (id) {
if (!ignore) { getUserQaRecordPage(id)
getUserQaRecordPage(id)
}
return () => {
ignore = true
}
} }
}, [id]) }, [id])
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment