🐛 fix(parameterComponent): set isPending to true for each tab in the parameter component state to fix a bug

🐛 fix(chatComponent): remove console.log statements for 'open' and 'isBuilt' variables to clean up code
🐛 fix(formModal): remove unnecessary console.log statement for 'tabsState[id.current]' variable to clean up code
🐛 fix(PageComponent): set isPending to true for each tab in the Page component state to fix a bug
This commit is contained in:
Lucas Oliveira 2023-06-28 18:16:59 -03:00
commit 7b2763a1af
4 changed files with 5 additions and 3 deletions

View file

@ -73,6 +73,7 @@ export default function ParameterComponent({
return {
...prev,
[tabId]: {
...prev[tabId],
isPending: true,
},
};

View file

@ -59,6 +59,8 @@ export default function Chat({ flow }: ChatType) {
prevNodesRef.current = currentNodes;
}, [nodes]);
console.log("open", open);
console.log("isBuilt",isBuilt);
return (
<>
{isBuilt ? (

View file

@ -373,10 +373,7 @@ export default function FormModal({
setChatKey(index);
}
}
console.log(tabsState[id.current])
return (
(tabsState[id.current].formKeysData?.input_keys && tabsState[id.current].formKeysData?.memory_keys) &&
<Dialog open={open} onOpenChange={setModalOpen}>
<DialogTrigger className="hidden"></DialogTrigger>
{tabsState[flow.id].formKeysData && (

View file

@ -151,6 +151,7 @@ export default function Page({ flow }: { flow: FlowType }) {
return {
...prev,
[tabId]: {
...prev[tabId],
isPending: true,
},
};
@ -166,6 +167,7 @@ export default function Page({ flow }: { flow: FlowType }) {
return {
...prev,
[tabId]: {
...prev[tabId],
isPending: true,
},
};