better loading display

This commit is contained in:
Paul Miller
2023-04-10 10:48:57 -05:00
parent a3800f6bc5
commit d9c351b2e2

View File

@@ -5,6 +5,15 @@ import { WaitlistAlreadyIn } from "~/components/waitlist/WaitlistAlreadyIn";
import WaitlistForm from "~/components/waitlist/WaitlistForm";
import ReloadPrompt from "~/components/Reload";
import { useMegaStore } from "~/state/megaStore";
import LoadingSpinner from "~/components/LoadingSpinner";
function FullscreenLoader() {
return (
<div class="w-screen h-screen flex justify-center items-center">
<LoadingSpinner />
</div>
);
}
export default function Home() {
const [state, _] = useMegaStore();
@@ -13,7 +22,7 @@ export default function Home() {
<>
<ReloadPrompt />
<Switch fallback={<>Loading...</>} >
<Switch fallback={<FullscreenLoader />} >
{/* TODO: might need this state.node_manager guard on all wallet routes */}
<Match when={state.user_status === "approved" && state.node_manager}>
<App />