initial implementation of playground on store, not working yet
This commit is contained in:
parent
4317ab35b7
commit
089446b1b7
2 changed files with 14 additions and 2 deletions
|
|
@ -63,8 +63,19 @@ export default function CollectionCardComponent({
|
|||
|
||||
useEffect(() => {
|
||||
if (currentFlowId && playground) {
|
||||
setNodes(currentFlow?.data?.nodes ?? [],true);
|
||||
setEdges(currentFlow?.data?.edges ?? [],true);
|
||||
console.log(currentFlowId)
|
||||
if(currentFlow){
|
||||
setNodes(currentFlow?.data?.nodes ?? [],true);
|
||||
setEdges(currentFlow?.data?.edges ?? [],true);
|
||||
}
|
||||
else{
|
||||
getComponent(data.id)
|
||||
.then((res) => {
|
||||
const newFlow = cloneFLowWithParent(res, res.id, data.is_component);
|
||||
setNodes(newFlow?.data?.nodes??[]);
|
||||
setEdges(newFlow?.data?.edges??[]);
|
||||
});
|
||||
}
|
||||
cleanFlowPool();
|
||||
}
|
||||
}, [currentFlowId]);
|
||||
|
|
|
|||
|
|
@ -371,6 +371,7 @@ export default function StorePage(): JSX.Element {
|
|||
data={item}
|
||||
authorized={validApiKey}
|
||||
disabled={loading}
|
||||
playground={item.last_tested_version?.includes("1.0.0")&& !item.is_component}
|
||||
/>
|
||||
</>
|
||||
);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue