Skip to content

Commit

Permalink
Add USD value to AssetItem and rearrange columns
Browse files Browse the repository at this point in the history
in CurrentDaoTreasuryAssets
  • Loading branch information
radzionc committed Nov 14, 2023
1 parent 926e691 commit 51181bb
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 10 deletions.
17 changes: 8 additions & 9 deletions apps/enterprise/src/dao/components/TreasuryAssets/AssetItem.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,14 @@ export const AssetItem = ({ asset }: AssetItemProps) => {
</Text>
</VStack>
</HStack>
<VStack gap={4}>
{!!asset.usd ? (
<Text weight="semibold">${formatAmount(asset.usd)}</Text>
) : (
<Text color="supporting" weight="semibold">
-
</Text>
)}
<VStack alignItems="end" gap={4}>
{!!asset.usd ? (
<Text weight="semibold">${formatAmount(getAssetBalanceInUsd(asset))}</Text>
) : (
Expand All @@ -66,14 +73,6 @@ export const AssetItem = ({ asset }: AssetItemProps) => {
{formatAmount(fromChainAmount(asset.balance, asset.decimals))} {asset.symbol}
</Text>
</VStack>

{!!asset.usd ? (
<Text weight="semibold">${formatAmount(asset.usd)}</Text>
) : (
<Text color="supporting" weight="semibold">
-
</Text>
)}
</AssetItemFrame>
</Container>
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,8 @@ export const CurrentDaoTreasuryAssets = () => {
<VStack gap={20}>
<Header>
<Text>Asset</Text>
<Text>Amount</Text>
<Text>Price</Text>
<Text>Amount</Text>
</Header>
<VStack gap={16}>
{assets.map((asset, index) => (
Expand Down

0 comments on commit 51181bb

Please sign in to comment.