code refactoring

This commit is contained in:
2023-10-20 19:20:00 +02:00
parent d100092f35
commit 9361d9ce29
4 changed files with 4 additions and 4 deletions

View File

@@ -2,5 +2,5 @@ import { atom } from 'recoil'
export const loadingAtom = atom({ export const loadingAtom = atom({
key: 'loadingAtom', key: 'loadingAtom',
default: false default: true
}) })

View File

@@ -14,7 +14,7 @@ const Downloads: React.FC = () => {
useEffect(() => { useEffect(() => {
if (active) { if (active) {
setIsLoading(true) setIsLoading(false)
} }
}, [active?.length]) }, [active?.length])

View File

@@ -23,7 +23,7 @@ const HomeActions: React.FC = () => {
setIsLoading(true) setIsLoading(true)
}} }}
onDownloadStart={(url) => { onDownloadStart={(url) => {
pushMessage(`Requested ${url}`, 'info',) pushMessage(`Requested ${url}`, 'info')
setOpenDialog(false) setOpenDialog(false)
setIsLoading(true) setIsLoading(true)
}} }}

View File

@@ -8,7 +8,7 @@ const LoadingBackdrop: React.FC = () => {
return ( return (
<Backdrop <Backdrop
sx={{ color: '#fff', zIndex: (theme) => theme.zIndex.drawer + 1 }} sx={{ color: '#fff', zIndex: (theme) => theme.zIndex.drawer + 1 }}
open={!isLoading} open={isLoading}
> >
<CircularProgress color="primary" /> <CircularProgress color="primary" />
</Backdrop> </Backdrop>