mars-v2-frontend/src/components/Borrow/Table/Columns/BorrowRate.tsx
Bob van der Helm d2afe06b16
Mp 3367 staking interactions (#613)
* ♻️ Refactor borrowRate to be in full numbers

* Enter into HLS Staking strategy

* HLS Staking deposited table + Portfolio pages

* tidy: refactored the masks for HealthBar

---------

Co-authored-by: Linkie Link <linkielink.dev@gmail.com>
2023-11-03 15:01:15 +01:00

26 lines
572 B
TypeScript

import React from 'react'
import { FormattedNumber } from 'components/FormattedNumber'
import Loading from 'components/Loading'
export const BORROW_RATE_META = { accessorKey: 'borrowRate', header: 'Borrow Rate' }
interface Props {
borrowRate: number | null
}
export default function BorrowRate(props: Props) {
if (props.borrowRate === null) {
return <Loading />
}
return (
<FormattedNumber
className='justify-end text-xs'
amount={props.borrowRate}
options={{ minDecimals: 2, maxDecimals: 2, suffix: '%' }}
animate
/>
)
}