import type { FC } from "react"; import { Button, Skeleton, Stack, Text } from "@mantine/core"; import { LoadingSkeleton } from "@wealthledger/ui"; import { useTranslation } from "react-i18next"; import { Link } from "react-router"; import { LedgerEntryRow } from "@/entities/broker-operation"; import type { AccountPageRecentOperations } from "../../../model/previews"; type RecentOperationsProps = { operations: AccountPageRecentOperations; }; const RecentOperations: FC = (props) => { const { t } = useTranslation(); const { operations } = props; return ( {operations.state === "loading" && ( {["first", "second", "third"].map(placeholder => )} )} {operations.state === "error" && {t("states.unavailableTitle")}} {operations.state === "empty" && {t("ledger.recentEmpty")}} {operations.state === "partial" && {t("investment.partial")}} {(operations.state === "loaded" || operations.state === "partial") && operations.items.map(operation => ( ))} ); }; export { RecentOperations };