From 4d54fe9970b3620953a9186f8fe3bb627159eeb6 Mon Sep 17 00:00:00 2001 From: karishmas6 Date: Sun, 8 Sep 2024 14:02:56 +0530 Subject: [PATCH] chore: lint --- src/components/organisms/RightSidePanel.tsx | 19 +------------------ 1 file changed, 1 insertion(+), 18 deletions(-) diff --git a/src/components/organisms/RightSidePanel.tsx b/src/components/organisms/RightSidePanel.tsx index 96fb7a61..cdb0f4b5 100644 --- a/src/components/organisms/RightSidePanel.tsx +++ b/src/components/organisms/RightSidePanel.tsx @@ -23,7 +23,6 @@ import RadioGroup from '@mui/material/RadioGroup'; // 2. Handle field deletion | confirmation // 3. Add description for each browser step // 4. Handle non custom action steps - interface RightSidePanelProps { onFinishCapture: () => void; } @@ -136,13 +135,11 @@ export const RightSidePanel: React.FC = ({ onFinishCapture const resetListState = useCallback(() => { setShowPaginationOptions(false); updatePaginationType(''); - setShowLimitOptions(false); - updateLimitType('10'); + setShowLimitOptions(false); updateLimitType(''); updateCustomLimit(''); }, [updatePaginationType, updateLimitType, updateCustomLimit]); - const handleStopGetList = useCallback(() => { stopGetList(); resetListState(); @@ -172,15 +169,12 @@ export const RightSidePanel: React.FC = ({ onFinishCapture notify('error', 'Please select a pagination type.'); return; } - const settings = getListSettingsObject(); const paginationSelector = settings.pagination?.selector; - if (['clickNext', 'clickLoadMore'].includes(paginationType) && !paginationSelector) { notify('error', 'Please select the pagination element first.'); return; } - stopPaginationMode(); setShowPaginationOptions(false); startLimitMode(); @@ -193,13 +187,11 @@ export const RightSidePanel: React.FC = ({ onFinishCapture notify('error', 'Please select a limit or enter a custom limit.'); return; } - const limit = limitType === 'custom' ? parseInt(customLimit) : parseInt(limitType); if (isNaN(limit) || limit <= 0) { notify('error', 'Please enter a valid limit.'); return; } - stopLimitMode(); setShowLimitOptions(false); stopCaptureAndEmitGetListSettings(); @@ -212,8 +204,6 @@ export const RightSidePanel: React.FC = ({ onFinishCapture } }, [captureStage, paginationType, limitType, customLimit, startPaginationMode, stopPaginationMode, startLimitMode, stopLimitMode, notify, stopCaptureAndEmitGetListSettings, getListSettingsObject]); - - const handlePaginationSettingSelect = (option: PaginationType) => { updatePaginationType(option); if (['clickNext', 'clickLoadMore'].includes(option)) { @@ -239,9 +229,7 @@ export const RightSidePanel: React.FC = ({ onFinishCapture Last action: {` ${lastAction}`} - - {!getText && !getScreenshot && !getList && } {getList && ( @@ -256,7 +244,6 @@ export const RightSidePanel: React.FC = ({ onFinishCapture )} - {showPaginationOptions && ( How can we find the next list item on the page? @@ -267,7 +254,6 @@ export const RightSidePanel: React.FC = ({ onFinishCapture )} - {showLimitOptions && ( @@ -296,7 +282,6 @@ export const RightSidePanel: React.FC = ({ onFinishCapture )} - {!getText && !getScreenshot && !getList && } {getText && <> @@ -306,7 +291,6 @@ export const RightSidePanel: React.FC = ({ onFinishCapture } - {!getText && !getScreenshot && !getList && } {getScreenshot && ( @@ -316,7 +300,6 @@ export const RightSidePanel: React.FC = ({ onFinishCapture )} - {browserSteps.map(step => (