mars-v2-frontend/src/components/HLS/Staking/Table/Columns/Account.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

31 lines
776 B
TypeScript

import React from 'react'
import HealthBar from 'components/Account/Health/HealthBar'
import TitleAndSubCell from 'components/TitleAndSubCell'
import useHealthComputer from 'hooks/useHealthComputer'
export const ACCOUNT_META = { id: 'account', header: 'Account', accessorKey: 'id' }
interface Props {
account: HLSAccountWithStrategy
}
export default function Name(props: Props) {
const { health, healthFactor } = useHealthComputer(props.account)
return (
<TitleAndSubCell
className=''
title={`Account ${props.account.id}`}
sub={
<HealthBar
health={health}
healthFactor={healthFactor}
className=''
showIcon
height='10'
iconClassName='mr-0.5 w-3'
/>
}
/>
)
}