feat: integrate oauth store in authorize page

This commit is contained in:
2025-06-02 23:16:11 +02:00
parent a5466f1b10
commit 0efc90567b

View File

@ -5,20 +5,20 @@ import { ArrowLeftRight, ChevronDown } from "lucide-react";
import { Button } from "@/components/ui/button";
import Avatar from "@/feature/Avatar";
import { useAuth } from "@/store/auth";
import { useOAuthContext } from "@/context/oauth";
import { useOAuth } from "@/store/oauth";
const AuthorizePage: FC = () => {
const promptAccountSelection = useAuth((state) => state.deleteActiveAccount);
const activeAccount = useAuth((state) => state.activeAccount);
const oauth = useOAuthContext();
const profile = useAuth((state) => state.profile);
const selectSession = useOAuth((state) => state.selectSession);
const handleAgree = useCallback(() => {
if (!activeAccount) return;
oauth.selectSession(activeAccount.access);
}, [activeAccount, oauth]);
selectSession(activeAccount.access);
}, [activeAccount, selectSession]);
return (
<div