Skip to content

Commit 9f3e91d

Browse files
committed
refactor: clean up
1 parent 2fa721d commit 9f3e91d

1 file changed

Lines changed: 5 additions & 3 deletions

File tree

pages/payments/index.tsx

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -146,9 +146,11 @@ export default function Payments ({ user, userId }: PaybuttonsProps): React.Reac
146146
Header: () => (<div style={{ textAlign: 'right' }}>Amount</div>),
147147
accessor: 'amount',
148148
sortType: compareNumericString,
149-
Cell: (cellProps) => {
150-
const networkTicker = NETWORK_TICKERS_FROM_ID[cellProps.cell.value.networkId]
151-
const formattedAmount = Number(cellProps.cell.value.amount).toLocaleString(undefined, {
149+
Cell: ({ cell }) => {
150+
const original = cell.value
151+
const { networkId, amount } = original
152+
const networkTicker = NETWORK_TICKERS_FROM_ID[networkId]
153+
const formattedAmount = Number(amount).toLocaleString(undefined, {
152154
minimumFractionDigits: DECIMALS[networkTicker],
153155
maximumFractionDigits: DECIMALS[networkTicker]
154156
})

0 commit comments

Comments
 (0)