feat(accounts): enrich brokerage account list

This commit is contained in:
2026-08-26 20:57:55 +03:00
parent 488ccad540
commit fd93133cfc
12 changed files with 230 additions and 44 deletions
+2 -2
View File
@@ -10,7 +10,7 @@ import {
import type { FC } from "react";
import { useTranslation } from "react-i18next";
import { Link } from "react-router";
import type { BrokerageAccount } from "@/entities/brokerage-account";
import type { BrokerageAccountCard } from "@/entities/brokerage-account";
import { BrokerageAccountList } from "@/entities/brokerage-account";
import { StateView } from "@/shared/ui";
@@ -26,7 +26,7 @@ type AccountsPageEmptyProps = {
};
type AccountsPageLoadedProps = {
accounts: BrokerageAccount[];
accounts: BrokerageAccountCard[];
refreshing?: boolean;
refreshError?: boolean;
retry?: () => void;
+6 -2
View File
@@ -1,4 +1,8 @@
import { errorCode, useBrokerageAccounts } from "@/entities/brokerage-account";
import {
brokerageAccountCards,
errorCode,
useBrokerageAccounts,
} from "@/entities/brokerage-account";
function useAccountsPageViewModel() {
const accounts = useBrokerageAccounts();
@@ -20,7 +24,7 @@ function useAccountsPageViewModel() {
};
return {
state: "loaded" as const,
accounts: accounts.data,
accounts: brokerageAccountCards(accounts.data),
refreshing: accounts.isFetching,
refreshError: accounts.isError,
retry: () => accounts.refetch(),