mars-v2-frontend/src/components/Account/AccountStats.tsx
Linkie Link 5c01ec6872
Mp 2681 interact with credit account modal (#189)
* MP-2681: fixed and simplified fund and withdraw
;.
:

* MP-2352: created the CreditAccountComposition

* fix: adjusted according to feedback

* fix: fixed funding account max

* fix: fix portfolio
2023-05-09 17:22:11 +02:00

29 lines
742 B
TypeScript

'use client'
import BigNumber from 'bignumber.js'
import AccountHealth from 'components/Account/AccountHealth'
import DisplayCurrency from 'components/DisplayCurrency'
import useStore from 'store'
interface Props {
balance: BigNumber
risk: number
health: number
}
export default function AccountStats(props: Props) {
const baseCurrency = useStore((s) => s.baseCurrency)
return (
<div className='w-full flex-wrap'>
<DisplayCurrency
coin={{ amount: props.balance.toString(), denom: baseCurrency.denom }}
className='w-full text-xl'
/>
<div className='mt-1 flex w-full items-center'>
<AccountHealth health={props.health} classNames='w-[140px]' hasLabel />
</div>
</div>
)
}