feat: add brocker account list

This commit is contained in:
2026-08-13 20:57:01 +03:00
parent 32e21de17d
commit 6e89c1a8f7
11 changed files with 330 additions and 8 deletions
@@ -10,6 +10,7 @@ import { useMutation, useQuery, useQueryClient } from "@tanstack/react-query";
import { useState } from "react";
import { useForm } from "react-hook-form";
import { useTranslation } from "react-i18next";
import { brokerageAccountsQueryKey } from "../../../entities/brokerage-account";
import { apiClient } from "../../../shared/api";
import type { paths } from "../../../shared/api/generated/schema";
import { useAuth } from "../../auth";
@@ -57,6 +58,7 @@ export function TbankConnectionSection() {
},
onSuccess: (data) => {
queryClient.setQueryData(["tbank-connection"], data);
queryClient.invalidateQueries({ queryKey: brokerageAccountsQueryKey });
reset();
},
onError: (error) => setRequestError(errorCode(error)),
@@ -73,6 +75,7 @@ export function TbankConnectionSection() {
connected: false,
connectedAt: null,
});
queryClient.invalidateQueries({ queryKey: brokerageAccountsQueryKey });
setDeleteOpened(false);
},
onError: () => setRequestError("REQUEST_ERROR"),