From 2e24650263289cb7cf4b8e989328dce071b3733c Mon Sep 17 00:00:00 2001 From: amhsirak Date: Thu, 9 Jan 2025 17:16:14 +0530 Subject: [PATCH] chore: lint --- src/components/organisms/RightSidePanel.tsx | 184 ++++++++++---------- 1 file changed, 92 insertions(+), 92 deletions(-) diff --git a/src/components/organisms/RightSidePanel.tsx b/src/components/organisms/RightSidePanel.tsx index 908aa600..3791d8a1 100644 --- a/src/components/organisms/RightSidePanel.tsx +++ b/src/components/organisms/RightSidePanel.tsx @@ -244,9 +244,9 @@ export const RightSidePanel: React.FC = ({ onFinishCapture const settings: Record = {}; browserSteps.forEach(step => { if (browserStepIdList.includes(step.id)) { - return; + return; } - + if (step.type === 'text' && step.label && step.selectorObj?.selector) { settings[step.label] = step.selectorObj; } @@ -452,17 +452,17 @@ export const RightSidePanel: React.FC = ({ onFinishCapture const isConfirmCaptureDisabled = useMemo(() => { // Check if we are in the initial stage and if there are no browser steps or no valid list selectors with fields if (captureStage !== 'initial') return false; - - const hasValidListSelector = browserSteps.some(step => - step.type === 'list' && - step.listSelector && + + const hasValidListSelector = browserSteps.some(step => + step.type === 'list' && + step.listSelector && Object.keys(step.fields).length > 0 ); - - // Disable the button if there are no valid list selectors or if there are unconfirmed list text fields + + // Disable the button if there are no valid list selectors or if there are unconfirmed list text fields return !hasValidListSelector || hasUnconfirmedListTextFields; }, [captureStage, browserSteps, hasUnconfirmedListTextFields]); - + const theme = useThemeMode(); const isDarkMode = theme.darkMode; return ( @@ -470,10 +470,10 @@ export const RightSidePanel: React.FC = ({ onFinishCapture {/* Last action: {` ${lastAction}`} */} - - - {!getText && !getScreenshot && !getList && showCaptureList && } - + + + {!getText && !getScreenshot && !getList && showCaptureList && } + {getList && ( <> @@ -481,11 +481,11 @@ export const RightSidePanel: React.FC = ({ onFinishCapture @@ -494,22 +494,22 @@ export const RightSidePanel: React.FC = ({ onFinishCapture variant="outlined" onClick={handleConfirmListCapture} disabled={captureStage === 'initial' ? isConfirmCaptureDisabled : hasUnconfirmedListTextFields} - sx={{ + sx={{ color: '#ff00c3 !important', borderColor: '#ff00c3 !important', backgroundColor: 'whitesmoke !important', - }} + }} > {captureStage === 'initial' ? t('right_panel.buttons.confirm_capture') : - captureStage === 'pagination' ? t('right_panel.buttons.confirm_pagination') : - captureStage === 'limit' ? t('right_panel.buttons.confirm_limit') : - t('right_panel.buttons.finish_capture')} + captureStage === 'pagination' ? t('right_panel.buttons.confirm_pagination') : + captureStage === 'limit' ? t('right_panel.buttons.confirm_limit') : + t('right_panel.buttons.finish_capture')} - - - - - - @@ -664,16 +664,16 @@ export const RightSidePanel: React.FC = ({ onFinishCapture - )} @@ -716,7 +716,7 @@ export const RightSidePanel: React.FC = ({ onFinishCapture ) }} - + /> {!confirmedTextSteps[step.id] ? ( @@ -740,8 +740,8 @@ export const RightSidePanel: React.FC = ({ onFinishCapture - {step.fullPage ? - t('right_panel.screenshot.display_fullpage') : + {step.fullPage ? + t('right_panel.screenshot.display_fullpage') : t('right_panel.screenshot.display_visible')} @@ -750,7 +750,7 @@ export const RightSidePanel: React.FC = ({ onFinishCapture <> {t('right_panel.messages.list_selected')} {Object.entries(step.fields).map(([key, field]) => ( - + = ({ onFinishCapture ) - }} + }} /> = ({ onFinishCapture ) }} - + /> {!confirmedListTextFields[step.id]?.[key] ? (