fixed bug
This commit is contained in:
parent
f2ff75ab29
commit
7c682c5c56
2 changed files with 4 additions and 3 deletions
|
|
@ -31,10 +31,10 @@ export default function Chat({flow, reactFlowInstance }:ChatType) {
|
|||
useEffect(()=>{
|
||||
updateFlow({..._.cloneDeep(flow),chat:chatHistory})
|
||||
// eslint-disable-next-line react-hooks/exhaustive-deps
|
||||
},[chatHistory, flow])
|
||||
},[saveChat])
|
||||
useEffect(()=>{
|
||||
setChatHistory(flow.chat)
|
||||
},[flow.chat])
|
||||
},[flow])
|
||||
useEffect(()=>{
|
||||
if(ref.current)
|
||||
ref.current.scrollIntoView({behavior: 'smooth'});
|
||||
|
|
|
|||
|
|
@ -63,9 +63,10 @@ export default function FlowPage({ flow }:{flow:FlowType}) {
|
|||
updateFlow(flow);
|
||||
}
|
||||
// eslint-disable-next-line react-hooks/exhaustive-deps
|
||||
}, [nodes, edges, reactFlowInstance, flow]);
|
||||
}, [nodes, edges]);
|
||||
|
||||
useEffect(() => {
|
||||
console.log('oi')
|
||||
setNodes(flow?.data?.nodes ?? []);
|
||||
setEdges(flow?.data?.edges ?? []);
|
||||
if (reactFlowInstance) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue