diff --git a/src/Components/Notes/Notes.tsx b/src/Components/Notes/Notes.tsx
index 4cccaf2..3a20f1c 100644
--- a/src/Components/Notes/Notes.tsx
+++ b/src/Components/Notes/Notes.tsx
@@ -22,18 +22,18 @@ export default function Notes() {
Loading Notes...
);
+ } else if (!logged_in && error) {
+ return (
+
+
Please login to use Clip Notes
+
+ );
} else if (error) {
return (
Error contacting Notes server
);
- } else if (!logged_in) {
- return (
-
-
Please login to use Clip Notes
-
- );
} else if (notes.length === 0) {
return (
diff --git a/src/Routes/UserPage/UserPage.tsx b/src/Routes/UserPage/UserPage.tsx
index 33a84c7..6d3be48 100644
--- a/src/Routes/UserPage/UserPage.tsx
+++ b/src/Routes/UserPage/UserPage.tsx
@@ -4,6 +4,7 @@ import { UserInfo } from "../../Components/Api/Api";
import { useQuery } from "react-query";
import { useSelector } from "react-redux";
import { LoginState } from "../../Interfaces/Interfaces";
+import LoginButton from "../../Components/LoginButton/LoginButton";
export default function UserPage() {
const { data, isLoading, error } = useQuery("user", UserInfo, { retry: 0 });
@@ -17,6 +18,16 @@ export default function UserPage() {
);
+ } else if (!logged_in && error) {
+ return (
+
+
+
+
Please login to view user info
+
+
+
+ );
} else if (error) {
return (
@@ -26,15 +37,6 @@ export default function UserPage() {
);
- } else if (!logged_in) {
- return (
-
-
-
-
Please login to view user info
-
-
- );
}
return (