feat: check if any pairs in workflow
This commit is contained in:
@@ -84,6 +84,14 @@ export const RightSidePanel: React.FC<RightSidePanelProps> = ({ onFinishCapture
|
|||||||
}, [id, socket, workflowHandler]);
|
}, [id, socket, workflowHandler]);
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
|
const hasPairs = workflow.workflow.length > 0;
|
||||||
|
|
||||||
|
if (!hasPairs) {
|
||||||
|
setShowCaptureList(true);
|
||||||
|
setShowCaptureScreenshot(true);
|
||||||
|
setShowCaptureText(true);
|
||||||
|
return;
|
||||||
|
}
|
||||||
const hasScrapeListAction = workflow.workflow.some(pair =>
|
const hasScrapeListAction = workflow.workflow.some(pair =>
|
||||||
pair.what.some(action => action.action === "scrapeList")
|
pair.what.some(action => action.action === "scrapeList")
|
||||||
);
|
);
|
||||||
|
|||||||
Reference in New Issue
Block a user