add coment to bug on upload

This commit is contained in:
anovazzi1 2023-02-27 19:05:44 -03:00
commit bb0873eeac
2 changed files with 1 additions and 2 deletions

View file

@ -28,14 +28,12 @@ export default function Chat({flow, reactFlowInstance }) {
}); });
setSaveChat(chat=>!chat) setSaveChat(chat=>!chat)
}; };
//bug here why??
useEffect(()=>{ useEffect(()=>{
console.log("flow") console.log("flow")
updateFlow({..._.cloneDeep(flow),chat:chatHistory}) updateFlow({..._.cloneDeep(flow),chat:chatHistory})
},[saveChat]) },[saveChat])
useEffect(()=>{ useEffect(()=>{
setChatHistory(flow.chat) setChatHistory(flow.chat)
// console.log(flow.chat)
},[flow]) },[flow])
useEffect(()=>{ useEffect(()=>{
if(ref.current) if(ref.current)

View file

@ -75,6 +75,7 @@ export function TabsProvider({ children }) {
link.download = `${flows[tabIndex].name}.json`; link.download = `${flows[tabIndex].name}.json`;
link.click(); link.click();
} }
//upload is always empty, don't know why
function uploadFlow() { function uploadFlow() {
const input = document.createElement("input"); const input = document.createElement("input");
input.type = "file"; input.type = "file";