1
This commit is contained in:
@@ -10,7 +10,7 @@ import { generateUUID } from "../../utils";
|
||||
import SkillTemps from "../SkillPage/components/SkillTemps";
|
||||
import ChatPanne from "./components/ChatPanne";
|
||||
import { captureAndAlertRequestErrorHoc } from "../../controllers/request";
|
||||
import { useDebounce } from "../../util/hook";
|
||||
import { useDebounce, useTable } from "../../util/hook";
|
||||
import duihuaDel from "../../assets/chat/duihua-del.png";
|
||||
import robot from "../../assets/robot.png";
|
||||
import robot2 from "../../assets/robot2.png";
|
||||
@@ -28,10 +28,15 @@ export default function SkillChatPage() {
|
||||
|
||||
const { flow: initFlow } = useContext(TabsContext);
|
||||
const [flow, setFlow] = useState<FlowType>(null)
|
||||
const [onlineFlows, setOnlineFlows] = useState([])
|
||||
useEffect(() => {
|
||||
readOnlineFlows().then(setOnlineFlows)
|
||||
}, [])
|
||||
const {
|
||||
data: onlineFlows,
|
||||
loading,
|
||||
search,
|
||||
} = useTable<FlowType>({}, (param) =>
|
||||
readOnlineFlows(param.page, param.keyword).then((res) => {
|
||||
return res;
|
||||
})
|
||||
);
|
||||
// 对话列表
|
||||
const { chatList, chatId, chatsRef, setChatId, addChat, deleteChat } = useChatList()
|
||||
const chatIdRef = useRef('')
|
||||
|
||||
Reference in New Issue
Block a user