[bugfix] fix leverage and implement buffer for health (#374)

* [bugfix] fix leverage and implement buffer for health

* [bugfix] properly remove council page from nav

* [bugfix] ensure integer values for HC

* [bugfix] infinite rerender withdraw + negative values
This commit is contained in:
Bob van der Helm
2023-08-15 16:34:01 +03:00
committed by GitHub
parent de185bf823
commit 9712573b00
7 changed files with 20 additions and 40 deletions
+1 -1
View File
@@ -61,7 +61,7 @@ function AccountDetails(props: Props) {
options={{ maxDecimals: 0, minDecimals: 0, suffix: '%' }}
animate
/>
{updatedHealth && health !== updatedHealth && (
{updatedHealth > 0 && health !== updatedHealth && (
<>
<ArrowRight
width={16}
-34
View File
@@ -1,34 +0,0 @@
import { Suspense } from 'react'
import { useParams } from 'react-router-dom'
import Card from 'components/Card'
import Loading from 'components/Loading'
import Text from 'components/Text'
function Content() {
const address = useParams().address || ''
return address ? (
<Text size='sm'>{`Council page for ${address}`}</Text>
) : (
<Text size='sm'>Council view only</Text>
)
}
function Fallback() {
return <Loading className='h-4 w-50' />
}
export default function Overview() {
return (
<Card
className='h-fit w-full justify-center bg-white/5'
title='Council'
contentClassName='px-4 py-6'
>
<Suspense fallback={<Fallback />}>
<Content />
</Suspense>
</Card>
)
}
-1
View File
@@ -13,7 +13,6 @@ export const menuTree: { page: Page; label: string }[] = [
{ page: 'lend', label: 'Earn' },
{ page: 'borrow', label: 'Borrow' },
{ page: 'portfolio', label: 'Portfolio' },
{ page: 'council', label: 'Council' },
]
export default function DesktopHeader() {