Update where loader is rendered in manage links dialog

This commit is contained in:
Ilango
2024-01-22 08:19:20 +05:30
parent bfa26a72c4
commit 76cb8794bf
@@ -115,6 +115,8 @@ const ManageScrapedLinksDialog = ({ show, dialogProps, onCancel, onSave }) => {
</Stack> </Stack>
</Box> </Box>
<Typography sx={{ mb: 2, fontWeight: 500 }}>Scraped Links</Typography> <Typography sx={{ mb: 2, fontWeight: 500 }}>Scraped Links</Typography>
<>
{loading && <BackdropLoader open={loading} />}
{selectedLinks.length > 0 ? ( {selectedLinks.length > 0 ? (
<PerfectScrollbar <PerfectScrollbar
style={{ style={{
@@ -154,13 +156,11 @@ const ManageScrapedLinksDialog = ({ show, dialogProps, onCancel, onSave }) => {
))} ))}
</PerfectScrollbar> </PerfectScrollbar>
) : ( ) : (
<>
{loading && <BackdropLoader open={loading} />}
<div style={{ display: 'flex', alignItems: 'center', justifyContent: 'center' }}> <div style={{ display: 'flex', alignItems: 'center', justifyContent: 'center' }}>
<Typography sx={{ my: 2 }}>Links scraped from the URL will appear here</Typography> <Typography sx={{ my: 2 }}>Links scraped from the URL will appear here</Typography>
</div> </div>
</>
)} )}
</>
</DialogContent> </DialogContent>
<DialogActions> <DialogActions>
<Button onClick={onCancel}>Cancel</Button> <Button onClick={onCancel}>Cancel</Button>