nice navigation and clean with authentication/login and such

This commit is contained in:
talksik
2022-03-18 10:36:46 -04:00
parent 9950a69efa
commit 1da12edde1
3 changed files with 22 additions and 3 deletions
@@ -1,5 +1,6 @@
import Login from "../../pages/Login";
import { STORE_ITEMS } from "../../electron/store";
import SkeletonLoader from "../loading/skeleton";
import { nirvanaApi } from "../../controller/nirvanaApi";
import { useEffect } from "react";
import { useGetUserDetails } from "../../controller/index";
@@ -16,8 +17,12 @@ export default function ProtectedRoute({
// nirvanaApi.getUserDetails();
}, []);
if (isLoading || true)
return <span>please wait while we authenticate you</span>;
if (isLoading)
return (
<div className="container h-screen w-screen">
<SkeletonLoader />
</div>
);
if (isError) {
return <Login onReady={() => refetch()} />;