From d77e883cb88a5dba43485c16bfa5ceae02692f94 Mon Sep 17 00:00:00 2001 From: katty barroso Date: Fri, 6 Sep 2024 08:29:44 -0500 Subject: [PATCH] Add feedback review --- .../src/components/PoolCard/index.tsx | 21 ++++++++++++------- 1 file changed, 14 insertions(+), 7 deletions(-) diff --git a/centrifuge-app/src/components/PoolCard/index.tsx b/centrifuge-app/src/components/PoolCard/index.tsx index aea05f3ab..73ed41c3e 100644 --- a/centrifuge-app/src/components/PoolCard/index.tsx +++ b/centrifuge-app/src/components/PoolCard/index.tsx @@ -8,6 +8,11 @@ import { CardHeader } from '../ListItemCardStyles' import { RouterTextLink } from '../TextLink' import { PoolStatus, PoolStatusKey } from './PoolStatus' +const StyledCard = styled(Card)` + cursor: pointer; + display: block; +` + type TrancheData = { name: string apr: string @@ -33,7 +38,7 @@ export type Tranche = { id: string currency: { name: string - decimals: CurrencyBalance | number + decimals: number } interestRatePerSec: { toAprPercent: () => Decimal @@ -84,6 +89,10 @@ export function PoolCard({ const words = tranche.currency.name.trim().split(' ') const metadata = metaData?.tranches[tranche.id] ?? null const trancheName = words[words.length - 1] + const investmentBalance = new CurrencyBalance( + metadata?.minInitialInvestment ?? 0, + tranche.currency.decimals + ).toDecimal() return { name: trancheName, @@ -94,20 +103,18 @@ export function PoolCard({ }) : '-', minInvestment: - metadata && metadata.minInitialInvestment - ? formatBalanceAbbreviated(Number(metadata.minInitialInvestment), '', 0) - : '-', + metadata && metadata.minInitialInvestment ? formatBalanceAbbreviated(investmentBalance, '', 0) : '-', } }) as TrancheData[] return ( - navigate(`/pools/${poolId}`)} padding={18} - style={{ cursor: 'pointer' }} height={320} + as={'a'} > @@ -177,6 +184,6 @@ export function PoolCard({ Investor Type {metaData?.pool?.investorType || '-'} - + ) }