feat: wrap pair action checkers in useEffect
This commit is contained in:
@@ -83,17 +83,19 @@ export const RightSidePanel: React.FC<RightSidePanelProps> = ({ onFinishCapture
|
|||||||
};
|
};
|
||||||
}, [id, socket, workflowHandler]);
|
}, [id, socket, workflowHandler]);
|
||||||
|
|
||||||
const hasScrapeListAction = workflow.workflow.some(pair =>
|
useEffect(() => {
|
||||||
pair.what.some(action => action.action === "scrapeList")
|
const hasScrapeListAction = workflow.workflow.some(pair =>
|
||||||
);
|
pair.what.some(action => action.action === "scrapeList")
|
||||||
|
);
|
||||||
|
|
||||||
const hasScreenshotAction = workflow.workflow.some(pair =>
|
const hasScreenshotAction = workflow.workflow.some(pair =>
|
||||||
pair.what.some(action => action.action === "screenshot")
|
pair.what.some(action => action.action === "screenshot")
|
||||||
);
|
);
|
||||||
|
|
||||||
const hasScrapeSchemaAction = workflow.workflow.some(pair =>
|
const hasScrapeSchemaAction = workflow.workflow.some(pair =>
|
||||||
pair.what.some(action => action.action === "scrapeSchema")
|
pair.what.some(action => action.action === "scrapeSchema")
|
||||||
);
|
);
|
||||||
|
}, [workflow]);
|
||||||
|
|
||||||
const handleTextLabelChange = (id: number, label: string, listId?: number, fieldKey?: string) => {
|
const handleTextLabelChange = (id: number, label: string, listId?: number, fieldKey?: string) => {
|
||||||
if (listId !== undefined && fieldKey !== undefined) {
|
if (listId !== undefined && fieldKey !== undefined) {
|
||||||
|
|||||||
Reference in New Issue
Block a user