From 11974a52f18ce07d9cda67290de6930f8bbc5ae5 Mon Sep 17 00:00:00 2001 From: karishmas6 Date: Thu, 10 Oct 2024 16:21:39 +0530 Subject: [PATCH] chore: lint --- src/components/organisms/RightSidePanel.tsx | 258 ++++++++++---------- 1 file changed, 129 insertions(+), 129 deletions(-) diff --git a/src/components/organisms/RightSidePanel.tsx b/src/components/organisms/RightSidePanel.tsx index c6d81c4e..2e46d323 100644 --- a/src/components/organisms/RightSidePanel.tsx +++ b/src/components/organisms/RightSidePanel.tsx @@ -120,7 +120,7 @@ export const RightSidePanel: React.FC = ({ onFinishCapture setHoverStates(prev => ({ ...prev, [id]: false })); }; - const handlePairDelete = () => {} + const handlePairDelete = () => { } const handleTextLabelChange = (id: number, label: string, listId?: number, fieldKey?: string) => { if (listId !== undefined && fieldKey !== undefined) { @@ -452,135 +452,135 @@ export const RightSidePanel: React.FC = ({ onFinishCapture )} { - workflow.workflow.map((pair, i, workflow) => ( - - {browserSteps.filter(step => { - if (step.type === 'text') { - return confirmedTextSteps[step.id]; // Check if text step is confirmed - } else if (step.type === 'list') { - return Object.values(confirmedListTextFields[step.id] || {}).some(Boolean); // Check if any list fields are confirmed - } else if (step.type === 'screenshot') { - return true; // Assuming all screenshot steps are considered confirmed by default - } - return false; // Default case - }).map((step) => ( - handleMouseEnter(step.id)} - onMouseLeave={() => handleMouseLeave(step.id)} - > - {step.type === 'text' && ( - <> - {hoverStates[step.id] && ( - handlePairDelete()} - sx={{ - position: 'absolute', - top: -15, - right: -15, - color: 'red', - p: 0, - zIndex: 1, - boxShadow: '5px', - backgroundColor: 'white', - borderRadius: '50%', - }} - > - - - )} - handleTextLabelChange(step.id, e.target.value)} - fullWidth - margin="normal" - error={!!errors[step.id]} - helperText={errors[step.id]} - InputProps={{ - readOnly: confirmedTextSteps[step.id], - startAdornment: ( - - - - ), + workflow.workflow.map((pair, i, workflow) => ( + + {browserSteps.filter(step => { + if (step.type === 'text') { + return confirmedTextSteps[step.id]; // Check if text step is confirmed + } else if (step.type === 'list') { + return Object.values(confirmedListTextFields[step.id] || {}).some(Boolean); // Check if any list fields are confirmed + } else if (step.type === 'screenshot') { + return true; // Assuming all screenshot steps are considered confirmed by default + } + return false; // Default case + }).map((step) => ( + - - - - ), - }} - /> - - )} - {step.type === 'screenshot' && ( - - - - {`Take ${step.fullPage ? 'Fullpage' : 'Visible Part'} Screenshot`} - - - )} - {step.type === 'list' && ( - <> - List Selected Successfully - {Object.entries(step.fields).map(([key, field]) => ( - - - handleTextLabelChange(field.id, e.target.value, step.id, key) - } - fullWidth - margin="normal" - InputProps={{ - readOnly: confirmedListTextFields[field.id]?.[key], - startAdornment: ( - - - - ), - }} - /> - - - - ), - }} - /> - - ))} - - )} - - ))} - - ))} + onMouseEnter={() => handleMouseEnter(step.id)} + onMouseLeave={() => handleMouseLeave(step.id)} + > + {step.type === 'text' && ( + <> + {hoverStates[step.id] && ( + handlePairDelete()} + sx={{ + position: 'absolute', + top: -15, + right: -15, + color: 'red', + p: 0, + zIndex: 1, + boxShadow: '5px', + backgroundColor: 'white', + borderRadius: '50%', + }} + > + + + )} + handleTextLabelChange(step.id, e.target.value)} + fullWidth + margin="normal" + error={!!errors[step.id]} + helperText={errors[step.id]} + InputProps={{ + readOnly: confirmedTextSteps[step.id], + startAdornment: ( + + + + ), + }} + /> + + + + ), + }} + /> + + )} + {step.type === 'screenshot' && ( + + + + {`Take ${step.fullPage ? 'Fullpage' : 'Visible Part'} Screenshot`} + + + )} + {step.type === 'list' && ( + <> + List Selected Successfully + {Object.entries(step.fields).map(([key, field]) => ( + + + handleTextLabelChange(field.id, e.target.value, step.id, key) + } + fullWidth + margin="normal" + InputProps={{ + readOnly: confirmedListTextFields[field.id]?.[key], + startAdornment: ( + + + + ), + }} + /> + + + + ), + }} + /> + + ))} + + )} + + ))} + + ))} );