Skip to content

Commit

Permalink
update ui
Browse files Browse the repository at this point in the history
  • Loading branch information
yuhochu committed Dec 29, 2023
1 parent 38cae88 commit 2baca0c
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
5 changes: 3 additions & 2 deletions screens/Dashboard/dashboardOverview.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,7 @@ const DashboardOverview = ({ suppliedRows, borrowedRows }) => {

<div className="relative flex xsm2:flex-col xsm:items-center items-end gap-4">
<HealthFactor userHealth={userHealthCur} />
{userHealth?.allHealths ? (
{userHealth?.allHealths?.length > 1 ? (
<div className="lp-healths flex flex-col items-center gap-2 mt-4">
{userHealth.allHealths.map((value: any) => {
const isActive = value.id === userHealthCur?.id;
Expand Down Expand Up @@ -262,6 +262,7 @@ const HealthFactor = ({ userHealth }) => {
const { data, healthFactor, lowHealthFactor, dangerHealthFactor } = userHealth || {};
const isDanger = healthFactor !== -1 && healthFactor < dangerHealthFactor;
const isWarning = healthFactor !== -1 && healthFactor < lowHealthFactor;
const healthFactorLabel = [-1, null].includes(healthFactor) ? "-%" : `${healthFactor}%`;
const isMobile = isMobileDevice();

let dangerTooltipStyles = {};
Expand Down Expand Up @@ -302,7 +303,7 @@ const HealthFactor = ({ userHealth }) => {
<DangerIcon />
</CustomTooltips>
)}
{data?.valueLabel}
{healthFactorLabel}
</div>
<div className="h5 text-gray-300 flex gap-1 items-center justify-center">
Health Factor
Expand Down
3 changes: 3 additions & 0 deletions styles/global.css
Original file line number Diff line number Diff line change
Expand Up @@ -778,6 +778,9 @@ options-list::-webkit-scrollbar {
supported by Chrome, Edge, Opera and Firefox */
}

.health-tab{
border-radius: 4px;
}
.health-tab:hover, .health-tab-active{
background: #2E304B;
}
Expand Down

0 comments on commit 2baca0c

Please sign in to comment.