feat: capture & emit list step
This commit is contained in:
@@ -128,15 +128,15 @@ export const RightSidePanel = () => {
|
|||||||
// };
|
// };
|
||||||
// }, [browserSteps]);
|
// }, [browserSteps]);
|
||||||
|
|
||||||
// const stopCaptureAndEmitGetListSettings = useCallback(() => {
|
const stopCaptureAndEmitGetListSettings = useCallback(() => {
|
||||||
// stopGetList();
|
stopGetList();
|
||||||
// const settings = getListSettingsObject();
|
const settings = getListSettingsObject();
|
||||||
// if (settings) {
|
if (settings) {
|
||||||
// socket?.emit('action', { action: 'scrapeList', settings });
|
socket?.emit('action', { action: 'scrapeList', settings });
|
||||||
// } else {
|
} else {
|
||||||
// notify('error', 'Unable to create list settings. Make sure you have defined a field for the list.');
|
notify('error', 'Unable to create list settings. Make sure you have defined a field for the list.');
|
||||||
// }
|
}
|
||||||
// }, [stopGetList, getListSettingsObject, socket, notify]);
|
}, [stopGetList, getListSettingsObject, socket, notify]);
|
||||||
|
|
||||||
// const handleListFieldChange = (stepId: number, key: 'label' | 'data', value: string) => {
|
// const handleListFieldChange = (stepId: number, key: 'label' | 'data', value: string) => {
|
||||||
// updateListStepField(stepId, key, value);
|
// updateListStepField(stepId, key, value);
|
||||||
@@ -167,7 +167,7 @@ export const RightSidePanel = () => {
|
|||||||
{getList &&
|
{getList &&
|
||||||
<>
|
<>
|
||||||
<Box display="flex" justifyContent="space-between" gap={2} style={{ margin: '15px' }}>
|
<Box display="flex" justifyContent="space-between" gap={2} style={{ margin: '15px' }}>
|
||||||
<Button variant="outlined" onClick={getListSettingsObject}>Confirm</Button>
|
<Button variant="outlined" onClick={stopCaptureAndEmitGetListSettings}>Confirm</Button>
|
||||||
<Button variant="outlined" color="error" onClick={stopGetList}>Discard</Button>
|
<Button variant="outlined" color="error" onClick={stopGetList}>Discard</Button>
|
||||||
</Box>
|
</Box>
|
||||||
</>
|
</>
|
||||||
|
|||||||
Reference in New Issue
Block a user