Update where loader is rendered in manage links dialog
This commit is contained in:
parent
bfa26a72c4
commit
76cb8794bf
|
|
@ -115,52 +115,52 @@ 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>
|
||||||
{selectedLinks.length > 0 ? (
|
<>
|
||||||
<PerfectScrollbar
|
{loading && <BackdropLoader open={loading} />}
|
||||||
style={{
|
{selectedLinks.length > 0 ? (
|
||||||
height: '100%',
|
<PerfectScrollbar
|
||||||
maxHeight: '320px',
|
style={{
|
||||||
overflowX: 'hidden',
|
height: '100%',
|
||||||
display: 'flex',
|
maxHeight: '320px',
|
||||||
flexDirection: 'column',
|
overflowX: 'hidden',
|
||||||
gap: 4
|
display: 'flex',
|
||||||
}}
|
flexDirection: 'column',
|
||||||
>
|
gap: 4
|
||||||
{selectedLinks.map((link, index) => (
|
}}
|
||||||
<div key={index} style={{ display: 'flex', width: '100%' }}>
|
>
|
||||||
<Box sx={{ display: 'flex', width: '100%' }}>
|
{selectedLinks.map((link, index) => (
|
||||||
<OutlinedInput
|
<div key={index} style={{ display: 'flex', width: '100%' }}>
|
||||||
sx={{ width: '100%' }}
|
<Box sx={{ display: 'flex', width: '100%' }}>
|
||||||
key={index}
|
<OutlinedInput
|
||||||
type='text'
|
sx={{ width: '100%' }}
|
||||||
onChange={(e) => handleChangeLink(index, e)}
|
key={index}
|
||||||
size='small'
|
type='text'
|
||||||
value={link}
|
onChange={(e) => handleChangeLink(index, e)}
|
||||||
name={`link_${index}`}
|
size='small'
|
||||||
/>
|
value={link}
|
||||||
</Box>
|
name={`link_${index}`}
|
||||||
<Box sx={{ width: 'auto', flexGrow: 1 }}>
|
/>
|
||||||
<IconButton
|
</Box>
|
||||||
sx={{ height: 30, width: 30 }}
|
<Box sx={{ width: 'auto', flexGrow: 1 }}>
|
||||||
size='small'
|
<IconButton
|
||||||
color='error'
|
sx={{ height: 30, width: 30 }}
|
||||||
onClick={() => handleRemoveLink(index)}
|
size='small'
|
||||||
edge='end'
|
color='error'
|
||||||
>
|
onClick={() => handleRemoveLink(index)}
|
||||||
<IconTrash />
|
edge='end'
|
||||||
</IconButton>
|
>
|
||||||
</Box>
|
<IconTrash />
|
||||||
</div>
|
</IconButton>
|
||||||
))}
|
</Box>
|
||||||
</PerfectScrollbar>
|
</div>
|
||||||
) : (
|
))}
|
||||||
<>
|
</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>
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue