diff --git a/client/src/App.tsx b/client/src/App.tsx
index a085952..f2dd7a8 100644
--- a/client/src/App.tsx
+++ b/client/src/App.tsx
@@ -3,13 +3,14 @@ import Navbar from "./components/Navbar";
import Home from "./pages/Home";
import Account from "./pages/Account";
import Landing from "./pages/Landing";
+import Loading from "./components/Loading";
import { useAuth0 } from "@auth0/auth0-react";
function App() {
const { isAuthenticated, isLoading } = useAuth0();
if (isLoading) {
- return
Loading...
;
+ return ;
}
return (
diff --git a/client/src/components/Loading.tsx b/client/src/components/Loading.tsx
new file mode 100644
index 0000000..060ec01
--- /dev/null
+++ b/client/src/components/Loading.tsx
@@ -0,0 +1,11 @@
+import React from "react";
+
+const Loading: React.FC = () => {
+ return (
+
+ );
+};
+
+export default Loading;
diff --git a/client/src/components/Profile.tsx b/client/src/components/Profile.tsx
index d482ad9..c795b68 100644
--- a/client/src/components/Profile.tsx
+++ b/client/src/components/Profile.tsx
@@ -2,21 +2,23 @@ import React from "react";
import { useAuth0 } from "@auth0/auth0-react";
const Profile: React.FC = () => {
- const { user, isAuthenticated, isLoading } = useAuth0();
-
- if (isLoading) {
- return Loading ...
;
- }
+ const { user, isAuthenticated } = useAuth0();
return (
isAuthenticated && user ? (
-
-
![{user.name}]({user.picture})
-
{user.nickname}
-
{user.email}
+
+
![{user.name}]({user.picture})
+
{user.nickname}
+
{user.email}
) : (
-
User not authenticated
+
+
User not authenticated
+
)
);
};
diff --git a/client/tsconfig.json b/client/tsconfig.json
index 1001dae..21c9faa 100644
--- a/client/tsconfig.json
+++ b/client/tsconfig.json
@@ -21,6 +21,6 @@
"noUnusedParameters": true,
"noFallthroughCasesInSwitch": true
},
- "include": ["src", "./jest.setup.ts", "tests/Navbar.spec.tsx"],
+ "include": ["src", "./jest.setup.ts", "tests/**/*"],
"references": [{ "path": "./tsconfig.node.json" }]
}