diff --git a/client/src/App.tsx b/client/src/App.tsx
index ab5f092..cf09fcf 100644
--- a/client/src/App.tsx
+++ b/client/src/App.tsx
@@ -4,15 +4,14 @@ import { useAuth0 } from "./authentication/auth0";
import MainLayout from "./layouts/MainLayout";
import AppRouter from "./routes/AppRouter";
import history from "./utils/history";
+import Preloader from "./components/Preloader";
export default function App() {
const { loading } = useAuth0();
- if (loading) {
- return
Loading...
;
- }
-
- return (
+ return loading ? (
+
+ ) : (
diff --git a/client/src/components/Preloader.tsx b/client/src/components/Preloader.tsx
index 3a1a5c2..187648b 100644
--- a/client/src/components/Preloader.tsx
+++ b/client/src/components/Preloader.tsx
@@ -1,56 +1,23 @@
-import React, { FC } from "react";
+import React, { FC, useState } from "react";
+import { Backdrop, CircularProgress, Button } from "@material-ui/core";
+import { makeStyles, createStyles, Theme } from "@material-ui/core/styles";
+
+const useStyles = makeStyles((theme: Theme) =>
+ createStyles({
+ backdrop: {
+ zIndex: theme.zIndex.drawer + 1,
+ color: "#fff",
+ },
+ })
+);
const Preloader: FC = () => {
+ const classes = useStyles();
+
return (
-
+
+
+
);
};