feat: improve ledger event rows
This commit is contained in:
@@ -1,9 +1,8 @@
|
||||
import { Alert, Button, Paper, Stack, Text } from "@mantine/core";
|
||||
import { Alert, Button, Stack, Text } from "@mantine/core";
|
||||
import type { FC } from "react";
|
||||
import { useTranslation } from "react-i18next";
|
||||
import { Link } from "react-router";
|
||||
import { formatMoney } from "@/entities/portfolio";
|
||||
import classes from "../AccountPage.module.css";
|
||||
import { LedgerEntryRow } from "@/entities/broker-operation";
|
||||
import type { AccountPageRecentOperations } from "../AccountPage.vm";
|
||||
|
||||
type RecentOperationsProps = {
|
||||
@@ -27,14 +26,7 @@ const RecentOperations: FC<RecentOperationsProps> = (props) => {
|
||||
) : null}
|
||||
{operations.state === "loaded"
|
||||
? operations.items.map((operation) => (
|
||||
<Paper className={classes.cash} key={operation.id} withBorder>
|
||||
<Text>{operation.description || operation.type}</Text>
|
||||
<Text fw={700}>
|
||||
{operation.payment
|
||||
? formatMoney(operation.payment)
|
||||
: t("ledger.noMoney")}
|
||||
</Text>
|
||||
</Paper>
|
||||
<LedgerEntryRow key={operation.id} operation={operation} />
|
||||
))
|
||||
: null}
|
||||
<Button component={Link} to={operations.to} variant="subtle">
|
||||
|
||||
Reference in New Issue
Block a user