Skip to content

Commit

Permalink
Update Consensus cards props
Browse files Browse the repository at this point in the history
  • Loading branch information
buberdds committed Dec 2, 2024
1 parent 37a2bc9 commit d4f1009
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
7 changes: 2 additions & 5 deletions src/app/pages/ConsensusDashboardPage/SnapshotDelegators.tsx
Original file line number Diff line number Diff line change
@@ -1,20 +1,17 @@
import { FC } from 'react'
import { useTranslation } from 'react-i18next'
import Box from '@mui/material/Box'
import { SnapshotTextCard } from '../../components/Snapshots/SnapshotCard'
import { useScreenSize } from '../../hooks/useScreensize'

type SnapshotDelegatorsProps = {
totalDelegators: number | undefined
}

export const SnapshotDelegators: FC<SnapshotDelegatorsProps> = ({ totalDelegators }) => {
const { t } = useTranslation()
const { isMobile } = useScreenSize()

return (
<SnapshotTextCard title={t('validator.delegators')}>
{totalDelegators && <Box sx={{ pb: isMobile ? 3 : 5 }}>{totalDelegators.toLocaleString()}</Box>}
<SnapshotTextCard title={t('validator.delegators')} withConstantHeight>
{typeof totalDelegators === 'number' && totalDelegators.toLocaleString()}
</SnapshotTextCard>
)
}
1 change: 1 addition & 0 deletions src/app/pages/ConsensusDashboardPage/SnapshotStaked.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ export const SnapshotStaked: FC<SnapshotStakedProps> = ({ totalStaked, ticker })
</Box>
)
}
withConstantHeight
>
{totalStaked && (
<Box sx={{ wordBreak: 'break-all', lineHeight: 1 }}>
Expand Down

0 comments on commit d4f1009

Please sign in to comment.