mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
Fix loading indicator showing when loaded
This commit is contained in:
parent
e2b951e25d
commit
0783c0eb10
1 changed files with 4 additions and 2 deletions
|
@ -146,12 +146,14 @@ const ConnectionRequired: FunctionComponent<ConnectionRequiredProps> = ({
|
||||||
setIsLoading(false);
|
setIsLoading(false);
|
||||||
};
|
};
|
||||||
|
|
||||||
loading.show();
|
|
||||||
validateConnection();
|
validateConnection();
|
||||||
}, [ isAdminRequired, isUserRequired, navigate ]);
|
}, [ isAdminRequired, isUserRequired, navigate ]);
|
||||||
|
|
||||||
|
// Show/hide the loading indicator
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
if (!isLoading) {
|
if (isLoading) {
|
||||||
|
loading.show();
|
||||||
|
} else {
|
||||||
loading.hide();
|
loading.hide();
|
||||||
}
|
}
|
||||||
}, [ isLoading ]);
|
}, [ isLoading ]);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue