fix: don't select session for oauth after account selection
This commit is contained in:
@ -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 (
|
||||||
|
Reference in New Issue
Block a user