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({
key: 'loadingAtom',
default: false
default: true
})

View File

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

View File

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

View File

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