From dde5509ea513eee9c407e874239f53bd5d572298 Mon Sep 17 00:00:00 2001 From: karishmas6 Date: Wed, 21 Aug 2024 23:38:33 +0530 Subject: [PATCH] chore: lint --- src/components/organisms/BrowserWindow.tsx | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/src/components/organisms/BrowserWindow.tsx b/src/components/organisms/BrowserWindow.tsx index eaf58760..d11d5855 100644 --- a/src/components/organisms/BrowserWindow.tsx +++ b/src/components/organisms/BrowserWindow.tsx @@ -120,7 +120,7 @@ export const BrowserWindow = () => { const canvasRect = canvasRef.current.getBoundingClientRect(); const clickX = e.clientX - canvasRect.left; const clickY = e.clientY - canvasRect.top; - + const highlightRect = highlighterData.rect; if ( clickX >= highlightRect.left && @@ -129,15 +129,15 @@ export const BrowserWindow = () => { clickY <= highlightRect.bottom ) { const options = getAttributeOptions(highlighterData.elementInfo?.tagName || '', highlighterData.elementInfo); - + if (getText === true) { if (options.length === 1) { // Directly use the available attribute if only one option is present const attribute = options[0].value; const data = attribute === 'href' ? highlighterData.elementInfo?.url || '' : - attribute === 'src' ? highlighterData.elementInfo?.imageUrl || '' : - highlighterData.elementInfo?.innerText || ''; - + attribute === 'src' ? highlighterData.elementInfo?.imageUrl || '' : + highlighterData.elementInfo?.innerText || ''; + addTextStep('', data, { selector: highlighterData.selector, tag: highlighterData.elementInfo?.tagName, @@ -153,7 +153,7 @@ export const BrowserWindow = () => { setShowAttributeModal(true); } } - + if (getList === true && !listSelector) { setListSelector(highlighterData.selector); } else if (getList === true && listSelector) { @@ -171,7 +171,7 @@ export const BrowserWindow = () => { attribute } }; - + setFields(prevFields => { const updatedFields = { ...prevFields, @@ -179,7 +179,7 @@ export const BrowserWindow = () => { }; return updatedFields; }); - + if (listSelector) { addListStep(listSelector, { ...fields, [newField.label]: newField }); } @@ -196,7 +196,7 @@ export const BrowserWindow = () => { } } }; - + const handleAttributeSelection = (attribute: string) => { if (selectedElement) {