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(() => {
|
useEffect(() => {
|
||||||
if (currentFlowId && playground) {
|
if (currentFlowId && playground) {
|
||||||
|
console.log(currentFlowId)
|
||||||
|
if(currentFlow){
|
||||||
setNodes(currentFlow?.data?.nodes ?? [],true);
|
setNodes(currentFlow?.data?.nodes ?? [],true);
|
||||||
setEdges(currentFlow?.data?.edges ?? [],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();
|
cleanFlowPool();
|
||||||
}
|
}
|
||||||
}, [currentFlowId]);
|
}, [currentFlowId]);
|
||||||
|
|
|
||||||
|
|
@ -371,6 +371,7 @@ export default function StorePage(): JSX.Element {
|
||||||
data={item}
|
data={item}
|
||||||
authorized={validApiKey}
|
authorized={validApiKey}
|
||||||
disabled={loading}
|
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