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
1 changed files with 43 additions and 43 deletions

View File

@ -115,6 +115,8 @@ const ManageScrapedLinksDialog = ({ show, dialogProps, onCancel, onSave }) => {
</Stack>
</Box>
<Typography sx={{ mb: 2, fontWeight: 500 }}>Scraped Links</Typography>
<>
{loading && <BackdropLoader open={loading} />}
{selectedLinks.length > 0 ? (
<PerfectScrollbar
style={{
@ -154,13 +156,11 @@ const ManageScrapedLinksDialog = ({ show, dialogProps, onCancel, onSave }) => {
))}
</PerfectScrollbar>
) : (
<>
{loading && <BackdropLoader open={loading} />}
<div style={{ display: 'flex', alignItems: 'center', justifyContent: 'center' }}>
<Typography sx={{ my: 2 }}>Links scraped from the URL will appear here</Typography>
</div>
</>
)}
</>
</DialogContent>
<DialogActions>
<Button onClick={onCancel}>Cancel</Button>