From 4b3a814d7e1a282295763149ef3e0211bc1ae754 Mon Sep 17 00:00:00 2001 From: LandaMm Date: Thu, 29 May 2025 14:57:35 +0200 Subject: [PATCH] fix: don't select account after logging into it --- web/src/pages/Login/index.tsx | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/web/src/pages/Login/index.tsx b/web/src/pages/Login/index.tsx index c236126..29d2ddf 100644 --- a/web/src/pages/Login/index.tsx +++ b/web/src/pages/Login/index.tsx @@ -9,7 +9,6 @@ import { useForm, type SubmitHandler } from "react-hook-form"; import { useCallback, useState } from "react"; import { loginApi } from "@/api/login"; import { useAccountRepo } from "@/repository/account"; -import { useOAuthContext } from "@/context/oauth"; import { useAuth } from "@/store/auth"; interface LoginForm { @@ -29,8 +28,6 @@ export default function LoginPage() { const [error, setError] = useState(""); const [success, setSuccess] = useState(""); - const oauth = useOAuthContext(); - const repo = useAccountRepo(); const location = useLocation(); @@ -65,7 +62,6 @@ export default function LoginPage() { setSuccess("You have successfully logged in"); reset(); - oauth.selectSession(response.access); await updateActiveAccount(account); } catch (err: any) { console.log(err); @@ -77,7 +73,7 @@ export default function LoginPage() { setLoading(false); } }, - [repo, reset, oauth, updateActiveAccount] + [repo, reset, updateActiveAccount] ); return (