From 2885342699aa3fb0ceca5e6fed0fd59a2359094f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nandy=20B=C3=A2?= Date: Tue, 27 Aug 2024 01:18:43 +0900 Subject: [PATCH] fix: RWA table view --- .../assetsView/views/AssetTable.tsx | 60 ++++++++++++++++++- 1 file changed, 59 insertions(+), 1 deletion(-) diff --git a/src/components/assetsView/views/AssetTable.tsx b/src/components/assetsView/views/AssetTable.tsx index f125cc5..3efd274 100644 --- a/src/components/assetsView/views/AssetTable.tsx +++ b/src/components/assetsView/views/AssetTable.tsx @@ -30,7 +30,7 @@ export const AssetTable: FC<{ {props.realtokens.map((item, index) => { const isAProperty = item.hasOwnProperty('rentStatus') if (!isAProperty) { - return + return } return })} @@ -159,4 +159,62 @@ const AssetTableRow: FC<{ value: UserRealtoken }> = (props) => { ) } + +const RWATableRow: FC<{ value: RWARealtoken }> = (props) => { + const { t } = useTranslation('common', { keyPrefix: 'numbers' }) + const transfersIsLoaded = useSelector(selectTransfersIsLoaded) + + const { shortName, value, unitPriceCost, amount, totalInvestment } = + props.value + + return ( + + + {shortName} + + + {useCurrencyValue(value)} + + {transfersIsLoaded ? ( + <> + + {'-'} + + + {'-'} + + + ) : null} + + + {useCurrencyValue(unitPriceCost)} + + + {t('decimal', { value: amount })} + + + {'-'} + + + {'-'} + + + {'-'} + + + {'-'} + + + {'-'} + + + {useCurrencyValue(totalInvestment)} + + + {'-'} + + + ) +} + AssetTableRow.displayName = 'AssetTableRow'