Display account amount on account page
This commit is contained in:
parent
1621fe41e2
commit
18bed77c7b
@ -3,6 +3,8 @@ import { MoneyMgrWebRouteContainer } from "../widgets/MoneyMgrWebRouteContainer"
|
|||||||
import { useAccounts } from "../hooks/AccountsListProvider";
|
import { useAccounts } from "../hooks/AccountsListProvider";
|
||||||
import { NotFoundRoute } from "./NotFound";
|
import { NotFoundRoute } from "./NotFound";
|
||||||
import { AccountWidget } from "../widgets/AccountWidget";
|
import { AccountWidget } from "../widgets/AccountWidget";
|
||||||
|
import { AmountWidget } from "../widgets/AmountWidget";
|
||||||
|
import { Typography } from "@mui/material";
|
||||||
|
|
||||||
export function AccountRoute(): React.ReactElement {
|
export function AccountRoute(): React.ReactElement {
|
||||||
const { accountId } = useParams();
|
const { accountId } = useParams();
|
||||||
@ -17,7 +19,13 @@ export function AccountRoute(): React.ReactElement {
|
|||||||
label={
|
label={
|
||||||
<span style={{ display: "inline-flex", alignItems: "center" }}>
|
<span style={{ display: "inline-flex", alignItems: "center" }}>
|
||||||
<AccountWidget account={account} />
|
<AccountWidget account={account} />
|
||||||
{account.name}
|
|
||||||
|
<span style={{ display: "inline-flex", flexDirection: "column" }}>
|
||||||
|
<span>{account.name}</span>
|
||||||
|
<Typography component={"span"} variant="subtitle1">
|
||||||
|
<AmountWidget amount={account.balance} />
|
||||||
|
</Typography>
|
||||||
|
</span>
|
||||||
</span>
|
</span>
|
||||||
}
|
}
|
||||||
>
|
>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user