code refactoring
This commit is contained in:
@@ -2,5 +2,5 @@ import { atom } from 'recoil'
|
||||
|
||||
export const loadingAtom = atom({
|
||||
key: 'loadingAtom',
|
||||
default: false
|
||||
default: true
|
||||
})
|
||||
@@ -14,7 +14,7 @@ const Downloads: React.FC = () => {
|
||||
|
||||
useEffect(() => {
|
||||
if (active) {
|
||||
setIsLoading(true)
|
||||
setIsLoading(false)
|
||||
}
|
||||
}, [active?.length])
|
||||
|
||||
|
||||
@@ -23,7 +23,7 @@ const HomeActions: React.FC = () => {
|
||||
setIsLoading(true)
|
||||
}}
|
||||
onDownloadStart={(url) => {
|
||||
pushMessage(`Requested ${url}`, 'info',)
|
||||
pushMessage(`Requested ${url}`, 'info')
|
||||
setOpenDialog(false)
|
||||
setIsLoading(true)
|
||||
}}
|
||||
|
||||
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user