chore: lint
This commit is contained in:
@@ -51,24 +51,24 @@ export const RightSidePanel = () => {
|
|||||||
};
|
};
|
||||||
|
|
||||||
const getTextSettingsObject = useCallback(() => {
|
const getTextSettingsObject = useCallback(() => {
|
||||||
const settings: Record<string, { selector: string; tag?: string; [key: string]: any }> = {};
|
const settings: Record<string, { selector: string; tag?: string;[key: string]: any }> = {};
|
||||||
browserSteps.forEach(step => {
|
browserSteps.forEach(step => {
|
||||||
if (step.type === 'text' && step.label && step.selectorObj?.selector) {
|
if (step.type === 'text' && step.label && step.selectorObj?.selector) {
|
||||||
settings[step.label] = step.selectorObj;
|
settings[step.label] = step.selectorObj;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
return settings;
|
return settings;
|
||||||
}, [browserSteps]);
|
}, [browserSteps]);
|
||||||
|
|
||||||
|
|
||||||
const stopCaptureAndEmitGetTextSettings = useCallback(() => {
|
const stopCaptureAndEmitGetTextSettings = useCallback(() => {
|
||||||
stopGetText();
|
stopGetText();
|
||||||
const settings = getTextSettingsObject();
|
const settings = getTextSettingsObject();
|
||||||
const hasTextSteps = browserSteps.some(step => step.type === 'text');
|
const hasTextSteps = browserSteps.some(step => step.type === 'text');
|
||||||
if (hasTextSteps) {
|
if (hasTextSteps) {
|
||||||
socket?.emit('action', { action: 'scrapeSchema', settings });
|
socket?.emit('action', { action: 'scrapeSchema', settings });
|
||||||
}
|
}
|
||||||
}, [stopGetText, getTextSettingsObject, socket, browserSteps]);
|
}, [stopGetText, getTextSettingsObject, socket, browserSteps]);
|
||||||
|
|
||||||
|
|
||||||
const captureScreenshot = (fullPage: boolean) => {
|
const captureScreenshot = (fullPage: boolean) => {
|
||||||
|
|||||||
Reference in New Issue
Block a user