"use client"; import * as React from "react"; import { useNetWorth, useTransactions } from "@/api/hooks/reads"; import { Card } from "@/ds"; import { tugrikRaw } from "@/ds/money"; import { assetsStrings as s } from "./strings"; const mutedStyle: React.CSSProperties = { color: "var(--seed-color-fg-neutral-subtle)" }; export interface AccountDetailProps { accountId: number; } /** * Read-only account detail — no bank-server actions live here (that's iOS's * `AccountDetailView`, gated behind a live bank connection this web app * doesn't drive yet). Shows the balance from `/networth` plus this * account's recent transactions. */ export function AccountDetail({ accountId }: AccountDetailProps) { const netWorth = useNetWorth(); const transactions = useTransactions({ account: accountId, limit: 30 }); const account = (netWorth.data?.accounts ?? []).find((a) => a.accountId === accountId); return (
…
) : (transactions.data ?? []).length === 0 ? ({s.accountDetail.noTransactions}
) : (