feat: display message if list fields is empty

This commit is contained in:
RohitR311
2024-12-28 19:11:13 +05:30
parent 4b12139497
commit 66bdb6afe1

View File

@@ -545,6 +545,9 @@ export const RightSidePanel: React.FC<RightSidePanelProps> = ({ onFinishCapture
</Box> </Box>
)} )}
{step.type === 'list' && ( {step.type === 'list' && (
Object.entries(step.fields).length === 0 ? (
<Typography>{t('right_panel.messages.list_empty')}</Typography>
) : (
<> <>
<Typography>{t('right_panel.messages.list_selected')}</Typography> <Typography>{t('right_panel.messages.list_selected')}</Typography>
{Object.entries(step.fields).map(([key, field]) => ( {Object.entries(step.fields).map(([key, field]) => (
@@ -599,6 +602,7 @@ export const RightSidePanel: React.FC<RightSidePanelProps> = ({ onFinishCapture
</Box> </Box>
))} ))}
</> </>
)
)} )}
</Box> </Box>
))} ))}