feat: remove duplicate useEffect

This commit is contained in:
karishmas6
2024-10-08 18:06:54 +05:30
parent 2e15c8eb44
commit e60e712b96

View File

@@ -79,17 +79,7 @@ export const RightSidePanel: React.FC<RightSidePanelProps> = ({ onFinishCapture
clearInterval(interval);
};
}, [id, socket, workflowHandler]);
useEffect(() => {
if (socket) {
socket.on("workflow", workflowHandler);
}
return () => {
socket?.off('workflow', workflowHandler);
}
}, [socket, workflowHandler]);
const hasScrapeListAction = workflow.workflow.some(pair =>
pair.what.some(action => action.action === "scrapeList")
);