fix: don't select session for oauth after account selection

This commit is contained in:
2025-05-29 14:56:37 +02:00
parent a7ddd3d1ff
commit ffefee930a

View File

@ -1,4 +1,3 @@
import { useOAuthContext } from "@/context/oauth";
import { type LocalAccount } from "@/repository/account"; import { type LocalAccount } from "@/repository/account";
import { useAuth } from "@/store/auth"; import { useAuth } from "@/store/auth";
import { CirclePlus, User } from "lucide-react"; import { CirclePlus, User } from "lucide-react";
@ -11,14 +10,11 @@ const AccountList: FC = () => {
const location = useLocation(); const location = useLocation();
const oauth = useOAuthContext();
const handleAccountSelect = useCallback( const handleAccountSelect = useCallback(
(account: LocalAccount) => { (account: LocalAccount) => {
oauth.selectSession(account.access);
updateActiveAccount(account); updateActiveAccount(account);
}, },
[oauth, updateActiveAccount] [updateActiveAccount]
); );
return ( return (