fix: fixed the portfolio account detail page layout
This commit is contained in:
parent
0154065ffb
commit
b273cc23b3
@ -5,7 +5,7 @@ import { ExclamationMarkCircled, Heart } from 'components/common/Icons'
|
||||
interface Props {
|
||||
isLoading: boolean
|
||||
health: number
|
||||
className: string
|
||||
className?: string
|
||||
colorClass?: string
|
||||
}
|
||||
|
||||
@ -14,9 +14,9 @@ export default function HealthIcon(props: Props) {
|
||||
const color = colorClass ?? 'text-white'
|
||||
|
||||
return (
|
||||
<>
|
||||
<div className='w-5'>
|
||||
{!isLoading && health === 0 ? (
|
||||
<ExclamationMarkCircled className={classNames('w-5 text-loss animate-pulse', className)} />
|
||||
<ExclamationMarkCircled className={classNames(' text-loss animate-pulse', className)} />
|
||||
) : (
|
||||
<Heart
|
||||
className={classNames(
|
||||
@ -26,6 +26,6 @@ export default function HealthIcon(props: Props) {
|
||||
)}
|
||||
/>
|
||||
)}
|
||||
</>
|
||||
</div>
|
||||
)
|
||||
}
|
||||
|
@ -19,7 +19,9 @@ export default function PortfolioAccountPageHeader(props: Props) {
|
||||
<NavLink to={getRoute('portfolio', searchParams, address, selectedAccountId)}>
|
||||
<Text className='text-white/40'>Portfolio</Text>
|
||||
</NavLink>
|
||||
<div className='h-3'>
|
||||
<ArrowRight className='h-3 text-white/60 ' />
|
||||
</div>
|
||||
<Text tag='span'>Credit Account {props.accountId}</Text>
|
||||
</div>
|
||||
)
|
||||
|
@ -3,10 +3,10 @@ import React from 'react'
|
||||
import HealthBar from 'components/account/Health/HealthBar'
|
||||
import HealthIcon from 'components/account/Health/HealthIcon'
|
||||
import Card from 'components/common/Card'
|
||||
import HLSTag from 'components/hls/HLSTag'
|
||||
import Loading from 'components/common/Loading'
|
||||
import Text from 'components/common/Text'
|
||||
import TitleAndSubCell from 'components/common/TitleAndSubCell'
|
||||
import HLSTag from 'components/hls/HLSTag'
|
||||
import useAccount from 'hooks/accounts/useAccount'
|
||||
import { DEFAULT_PORTFOLIO_STATS } from 'utils/constants'
|
||||
|
||||
@ -31,9 +31,11 @@ export default function SummarySkeleton(props: Props) {
|
||||
{account?.kind === 'high_levered_strategy' && <HLSTag />}
|
||||
</div>
|
||||
{health !== undefined && healthFactor !== undefined && (
|
||||
<div className='flex gap-1 max-w-[300px] flex-grow'>
|
||||
<HealthIcon isLoading={healthFactor === 0} health={health} className='w-5' />
|
||||
<HealthBar health={health} healthFactor={healthFactor} className='h-full' />
|
||||
<div className='flex items-center justify-end flex-grow gap-2'>
|
||||
<HealthIcon isLoading={healthFactor === 0} health={health} />
|
||||
<div className='w-[260px]'>
|
||||
<HealthBar health={health} healthFactor={healthFactor} className='h-3' />
|
||||
</div>
|
||||
</div>
|
||||
)}
|
||||
</div>
|
||||
|
Loading…
Reference in New Issue
Block a user