From 64342279f7ac1cb73838f4572f22ded283c58ac2 Mon Sep 17 00:00:00 2001 From: karishmas6 Date: Sat, 10 Aug 2024 05:04:50 +0530 Subject: [PATCH] feat: capture & emit list step --- src/components/organisms/RightSidePanel.tsx | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/src/components/organisms/RightSidePanel.tsx b/src/components/organisms/RightSidePanel.tsx index 804a877a..6e1b8132 100644 --- a/src/components/organisms/RightSidePanel.tsx +++ b/src/components/organisms/RightSidePanel.tsx @@ -128,15 +128,15 @@ export const RightSidePanel = () => { // }; // }, [browserSteps]); - // const stopCaptureAndEmitGetListSettings = useCallback(() => { - // stopGetList(); - // const settings = getListSettingsObject(); - // if (settings) { - // socket?.emit('action', { action: 'scrapeList', settings }); - // } else { - // notify('error', 'Unable to create list settings. Make sure you have defined a field for the list.'); - // } - // }, [stopGetList, getListSettingsObject, socket, notify]); + const stopCaptureAndEmitGetListSettings = useCallback(() => { + stopGetList(); + const settings = getListSettingsObject(); + if (settings) { + socket?.emit('action', { action: 'scrapeList', settings }); + } else { + notify('error', 'Unable to create list settings. Make sure you have defined a field for the list.'); + } + }, [stopGetList, getListSettingsObject, socket, notify]); // const handleListFieldChange = (stepId: number, key: 'label' | 'data', value: string) => { // updateListStepField(stepId, key, value); @@ -167,7 +167,7 @@ export const RightSidePanel = () => { {getList && <> - +