Skip to content

Commit

Permalink
🚸 dashboard summary: add tooltip to health factor
Browse files Browse the repository at this point in the history
  • Loading branch information
JuampiRombola committed Sep 19, 2023
1 parent 173bd4c commit b83af3d
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 2 deletions.
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
import React, { useMemo } from 'react';
import { Box, Skeleton, Typography, useTheme } from '@mui/material';
import { Box, Skeleton, Tooltip, Typography, useTheme } from '@mui/material';
import FavoriteBorderIcon from '@mui/icons-material/FavoriteBorder';
import { useTranslation } from 'react-i18next';
import useHealthFactor from 'hooks/useHealthFactor';
import parseHealthFactor from 'utils/parseHealthFactor';
import useAccountData from 'hooks/useAccountData';
import InfoOutlinedIcon from '@mui/icons-material/InfoOutlined';

const HealthFactor = () => {
const { t } = useTranslation();
Expand Down Expand Up @@ -38,6 +39,15 @@ const HealthFactor = () => {
<Typography variant="dashboardTitle" color="primary" noWrap>
{t('Health Factor')}
</Typography>
<Tooltip
title={t(
'The Health Factor represents how “safe” your leverage portfolio is, defined as the risk-adjusted proportion of collateral deposited versus the borrowed risk-adjusted amount. A health factor below 1x will be considered with a shortfall and open to liquidation.',
)}
placement="bottom"
arrow
>
<InfoOutlinedIcon sx={{ fontSize: 14 }} />
</Tooltip>
</Box>
{isFetching || !healthFactor ? (
<Skeleton width={100} height={42} />
Expand Down
3 changes: 2 additions & 1 deletion i18n/es/translation.json
Original file line number Diff line number Diff line change
Expand Up @@ -465,5 +465,6 @@
"This new tool further improves your security when interacting with the Protocol.": "Esta nueva herramienta mejora aún más tu seguridad al interactuar con el Protocolo.",
"Theme": "Tema",
"Language": "Idioma",
"Settings": "Configuración"
"Settings": "Configuración",
"The Health Factor represents how “safe” your leverage portfolio is, defined as the risk-adjusted proportion of collateral deposited versus the borrowed risk-adjusted amount. A health factor below 1x will be considered with a shortfall and open to liquidation.": "El Factor de Salud representa cuán “seguro“ es tu portafolio con apalancamiento, definido como la proporción ajustada al riesgo del colateral depositado frente al monto ajustado al riesgo que se ha tomado prestado. Un factor de salud por debajo de 1x se considerará con un déficit y estará abierto a la liquidación."
}

0 comments on commit b83af3d

Please sign in to comment.