feat: set visibility of actions

This commit is contained in:
karishmas6
2024-10-08 18:53:17 +05:30
parent 3eb30beb11
commit 2d75e4d410

View File

@@ -95,6 +95,10 @@ export const RightSidePanel: React.FC<RightSidePanelProps> = ({ onFinishCapture
const hasScrapeSchemaAction = workflow.workflow.some(pair =>
pair.what.some(action => action.action === "scrapeSchema")
);
setShowCaptureList(!(hasScrapeListAction || hasScrapeSchemaAction || hasScreenshotAction));
setShowCaptureScreenshot(!(hasScrapeListAction || hasScrapeSchemaAction || hasScreenshotAction));
setShowCaptureText(!(hasScrapeListAction || hasScreenshotAction));
}, [workflow]);
const handleTextLabelChange = (id: number, label: string, listId?: number, fieldKey?: string) => {