chore: lint

This commit is contained in:
karishmas6
2024-08-06 05:06:04 +05:30
parent 24c1d0cf57
commit de21f701a2

View File

@@ -103,45 +103,45 @@ export const RightSidePanel = () => {
)} )}
</Box> </Box>
<Box> <Box>
{browserSteps.map(step => ( {browserSteps.map(step => (
<Box key={step.id} sx={{ boxShadow: 5, padding: '10px', margin: '10px', borderRadius: '4px' }}> <Box key={step.id} sx={{ boxShadow: 5, padding: '10px', margin: '10px', borderRadius: '4px' }}>
{ {
step.type === 'text' ? ( step.type === 'text' ? (
<> <>
<TextField <TextField
label="Label" label="Label"
value={textLabels[step.id] || step.label || ''} value={textLabels[step.id] || step.label || ''}
onChange={(e) => handleTextLabelChange(step.id, e.target.value)} onChange={(e) => handleTextLabelChange(step.id, e.target.value)}
fullWidth fullWidth
margin="normal" margin="normal"
error={!!errors[step.id]} error={!!errors[step.id]}
helperText={errors[step.id]} helperText={errors[step.id]}
InputProps={{ readOnly: confirmedTextSteps[step.id] }} InputProps={{ readOnly: confirmedTextSteps[step.id] }}
/> />
<TextField <TextField
label="Data" label="Data"
value={step.data} value={step.data}
fullWidth fullWidth
margin="normal" margin="normal"
InputProps={{ readOnly: confirmedTextSteps[step.id] }} InputProps={{ readOnly: confirmedTextSteps[step.id] }}
/> />
{!confirmedTextSteps[step.id] && ( {!confirmedTextSteps[step.id] && (
<Box display="flex" justifyContent="space-between" gap={2}> <Box display="flex" justifyContent="space-between" gap={2}>
<Button variant="contained" onClick={() => handleTextStepConfirm(step.id)} disabled={!textLabels[step.id]?.trim()}>Confirm</Button> <Button variant="contained" onClick={() => handleTextStepConfirm(step.id)} disabled={!textLabels[step.id]?.trim()}>Confirm</Button>
<Button variant="contained" onClick={() => handleTextStepDiscard(step.id)}>Discard</Button> <Button variant="contained" onClick={() => handleTextStepDiscard(step.id)}>Discard</Button>
</Box> </Box>
)} )}
</> </>
) : ( ) : (
step.type === 'screenshot' && ( step.type === 'screenshot' && (
<Typography>{`Take ${step.fullPage ? 'Fullpage' : 'Visible Part'} Screenshot`}</Typography> <Typography>{`Take ${step.fullPage ? 'Fullpage' : 'Visible Part'} Screenshot`}</Typography>
) )
) )
} }
</Box>
))}
</Box> </Box>
))}
</Box>
</Paper> </Paper>
); );
}; };