24 lines
530 B
TypeScript
24 lines
530 B
TypeScript
import AssetRate from 'components/common/assets/AssetRate'
|
|
import Loading from 'components/common/Loading'
|
|
|
|
export const APY_META = { accessorKey: 'apy.deposit', header: 'APY' }
|
|
|
|
interface Props {
|
|
apy: number
|
|
borrowEnabled: boolean
|
|
isLoading: boolean
|
|
}
|
|
export default function Apr(props: Props) {
|
|
if (props.isLoading) return <Loading />
|
|
|
|
return (
|
|
<AssetRate
|
|
rate={props.apy ?? 0}
|
|
isEnabled={props.borrowEnabled}
|
|
className='justify-end text-xs'
|
|
type='apy'
|
|
orientation='ltr'
|
|
/>
|
|
)
|
|
}
|