diff --git a/src/client/routes/login.tsx b/src/client/routes/login.tsx index 248b4d6..3e5593f 100644 --- a/src/client/routes/login.tsx +++ b/src/client/routes/login.tsx @@ -1,52 +1,18 @@ -import { createFileRoute, useNavigate } from "@tanstack/react-router"; +import { createFileRoute } from "@tanstack/react-router"; import { useEffect } from "react"; -import { useTranslation } from "react-i18next"; -import { useAuth } from "../hooks/useAuth"; export const Route = createFileRoute("/login")({ component: LoginPage, }); function LoginPage() { - const { t } = useTranslation(); - const navigate = useNavigate(); - const { data: auth, isLoading } = useAuth(); - useEffect(() => { - if (auth?.authenticated) { - navigate({ to: "/" }); - } - }, [auth, navigate]); - - if (isLoading) { - return ( -
-

{t("actions.loading")}

-
- ); - } + window.location.href = "/login"; + }, []); return ( -
-
-

- {t("auth.signInToGearBox")} -

-
-

- {t("auth.redirectDescription")} -

- -
-
+
+

Signing in...

); }