mirror of
https://github.com/movie-web/movie-web.git
synced 2024-12-30 23:51:49 +01:00
Add loading screen for SetupPart checks
This commit is contained in:
parent
c0241000d0
commit
e758f32483
@ -8,6 +8,7 @@ import { isExtensionActive } from "@/backend/extension/messaging";
|
|||||||
import { singularProxiedFetch } from "@/backend/helpers/fetch";
|
import { singularProxiedFetch } from "@/backend/helpers/fetch";
|
||||||
import { Button } from "@/components/buttons/Button";
|
import { Button } from "@/components/buttons/Button";
|
||||||
import { Icon, Icons } from "@/components/Icon";
|
import { Icon, Icons } from "@/components/Icon";
|
||||||
|
import { Loading } from "@/components/layout/Loading";
|
||||||
import { SettingsCard } from "@/components/layout/SettingsCard";
|
import { SettingsCard } from "@/components/layout/SettingsCard";
|
||||||
import {
|
import {
|
||||||
StatusCircle,
|
StatusCircle,
|
||||||
@ -121,7 +122,15 @@ export function SetupPart() {
|
|||||||
const { t } = useTranslation();
|
const { t } = useTranslation();
|
||||||
const navigate = useNavigate();
|
const navigate = useNavigate();
|
||||||
const { loading, setupStates, globalState } = useIsSetup();
|
const { loading, setupStates, globalState } = useIsSetup();
|
||||||
if (loading || !setupStates) return <p>Loading states...</p>; // TODO proper loading screen
|
if (loading || !setupStates) {
|
||||||
|
return (
|
||||||
|
<SettingsCard>
|
||||||
|
<div className="flex py-6 items-center justify-center">
|
||||||
|
<Loading />
|
||||||
|
</div>
|
||||||
|
</SettingsCard>
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
const textLookupMap: Record<
|
const textLookupMap: Record<
|
||||||
Status,
|
Status,
|
||||||
|
Loading…
Reference in New Issue
Block a user