found bug on save langflow state
This commit is contained in:
parent
5c64bc6698
commit
c2d21178e1
1 changed files with 7 additions and 0 deletions
|
|
@ -39,6 +39,7 @@ export function TabsProvider({ children }: { children: ReactNode }) {
|
||||||
return newNodeId.current;
|
return newNodeId.current;
|
||||||
}
|
}
|
||||||
function save(){
|
function save(){
|
||||||
|
console.log("save")
|
||||||
if (flows.length !== 0)
|
if (flows.length !== 0)
|
||||||
window.localStorage.setItem(
|
window.localStorage.setItem(
|
||||||
"tabsData",
|
"tabsData",
|
||||||
|
|
@ -59,6 +60,12 @@ export function TabsProvider({ children }: { children: ReactNode }) {
|
||||||
console.log(templates)
|
console.log(templates)
|
||||||
console.log(Object.keys(templates).length)
|
console.log(Object.keys(templates).length)
|
||||||
let cookieObject:LangFlowState = JSON.parse(cookie);
|
let cookieObject:LangFlowState = JSON.parse(cookie);
|
||||||
|
cookieObject.flows.forEach(flow=>{
|
||||||
|
console.log(flow)
|
||||||
|
// flow.data.nodes.forEach(node=>{
|
||||||
|
// console.log(node.data)
|
||||||
|
// })
|
||||||
|
})
|
||||||
setTabIndex(cookieObject.tabIndex);
|
setTabIndex(cookieObject.tabIndex);
|
||||||
setFlows(cookieObject.flows);
|
setFlows(cookieObject.flows);
|
||||||
setId(cookieObject.id);
|
setId(cookieObject.id);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue