Skip to content

Commit

Permalink
feat: hide health factor of 0 for new users
Browse files Browse the repository at this point in the history
  • Loading branch information
chambaz committed Feb 26, 2024
1 parent 6d6f6b0 commit 3ec4c3f
Showing 1 changed file with 13 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -95,17 +95,19 @@ export const ActionBoxPreview = ({
)}
</Stat>

<Stat style={{ color: healthColor }} label="Health">
{accountSummary.healthFactor && percentFormatter.format(accountSummary.healthFactor)}
{accountSummary.healthFactor && preview?.health ? <IconArrowRight width={12} height={12} /> : ""}
{isLoading ? (
<Skeleton className="h-4 w-[45px] bg-[#373F45]" />
) : preview?.health ? (
percentFormatter.format(preview.health)
) : (
""
)}
</Stat>
{accountSummary.borrowingAmount > 0 && (
<Stat style={{ color: healthColor }} label="Health">
{accountSummary.healthFactor && percentFormatter.format(accountSummary.healthFactor)}
{accountSummary.healthFactor && preview?.health ? <IconArrowRight width={12} height={12} /> : ""}
{isLoading ? (
<Skeleton className="h-4 w-[45px] bg-[#373F45]" />
) : preview?.health ? (
percentFormatter.format(preview.health)
) : (
""
)}
</Stat>
)}
{(actionMode === ActionType.Borrow || isBorrowing) && preview?.liquidationPrice && (
<Stat style={{ color: liquidationColor }} label="Liquidation price">
{selectedBank.isActive &&
Expand Down

0 comments on commit 3ec4c3f

Please sign in to comment.