From 97a370a3557b4a32a4e6c9c530a7b949bb77b4f8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dorien=20Gr=C3=B6nwald?= <57871803+doriengr@users.noreply.github.com> Date: Tue, 8 Oct 2024 17:19:16 +0200 Subject: [PATCH] fix: redirect to dashboard after login (#115) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Dorien Grönwald --- frontend/src/routes/login.tsx | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/frontend/src/routes/login.tsx b/frontend/src/routes/login.tsx index cb7963f2..3038d80f 100644 --- a/frontend/src/routes/login.tsx +++ b/frontend/src/routes/login.tsx @@ -4,10 +4,9 @@ import { createFileRoute } from '@tanstack/react-router' export const Route = createFileRoute('/login')({ beforeLoad: async () => { const loginUrl = await userApi.v1UserLoginGet({ - redirectUrl: `${window.location.origin}/auth/callback?redirect=${encodeURIComponent("/")}` + redirectUrl: `${window.location.origin}/auth/callback?redirect=${encodeURIComponent("/dashboard")}` }).then((res) => res.loginUrl) window.location.href = loginUrl } - })