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