diff --git a/src/components/hoc/withProtectedRoute.tsx b/src/components/hoc/withProtectedRoute.tsx
index f935b5a3d4..75e51a84c3 100644
--- a/src/components/hoc/withProtectedRoute.tsx
+++ b/src/components/hoc/withProtectedRoute.tsx
@@ -1,7 +1,7 @@
import { ComponentType, useEffect, useRef } from "react";
import { useNavigate, useLocation } from "react-router-dom";
import { useSignalEffect } from "@preact/signals-react/runtime";
-import { Spinner } from "~/components/ui";
+import { LoadingSpinner } from "~/components/ui";
import { authentication } from "~/signals";
export const withProtectionRoute =
(
@@ -26,7 +26,7 @@ export const withProtectionRoute =
(
) {
return (
-
+
);
}
@@ -57,7 +57,7 @@ const RedirectToLogin = () => {
}, [navigate, pathname]);
return (
-
+
);
};
diff --git a/src/components/ui/LoadingSpinner.tsx b/src/components/ui/LoadingSpinner.tsx
index 5d3d29964b..96cb51911c 100644
--- a/src/components/ui/LoadingSpinner.tsx
+++ b/src/components/ui/LoadingSpinner.tsx
@@ -25,7 +25,7 @@ export const LoadingSpinner = ({
"data-[leave]:duration-300",
)}
>
-
+
{message && }
diff --git a/src/pages/login.tsx b/src/pages/login.tsx
index 9a84a929ec..3b81ef0623 100644
--- a/src/pages/login.tsx
+++ b/src/pages/login.tsx
@@ -22,11 +22,11 @@ export const Login = () => {
const authLoaderMessage = getAuthLoaderMessage();
const shouldShowLoader = checkShouldShowLoader();
- // const showNoAccessModal = authStatus.value === AUTH_STATUS.NO_ACCESS;
function checkShouldShowLoader() {
return (
authStatus.value === AUTH_STATUS.LOGGING ||
- authStatus.value === AUTH_STATUS.LOGGED_IN
+ authStatus.value === AUTH_STATUS.LOGGED_IN ||
+ authStatus.value === AUTH_STATUS.GET_USER_INFO
);
}
function getAuthLoaderMessage() {
@@ -38,11 +38,6 @@ export const Login = () => {
}
return "Getting Session...";
}
- // const handleClose = () => {
- // if (authentication.status.value !== AUTH_STATUS.LOGGED_OUT) {
- // logout();
- // }
- // };
const handleOnSumbit = (ev: React.FormEvent) => {
ev.preventDefault();
@@ -119,29 +114,9 @@ export const Login = () => {
{shouldShowLoader && (
-
+
)}
-
- {/*
- {
- handleClose();
- if (window) {
- window.open("https://storyteller.ai/beta-key/redeem", "_blank");
- }
- }}
- />*/}
);