Skip to content

Commit

Permalink
Temporary remove usage of uptime component
Browse files Browse the repository at this point in the history
  • Loading branch information
buberdds committed Dec 18, 2024
1 parent 62d8d79 commit c561385
Show file tree
Hide file tree
Showing 4 changed files with 2 additions and 29 deletions.
1 change: 1 addition & 0 deletions .changelog/1639.trivial.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Temporary remove usage of uptime component
8 changes: 0 additions & 8 deletions src/app/components/Validators/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ import { ValidatorLink } from './ValidatorLink'
import { useRequiredScopeParam } from '../../hooks/useScopeParam'
import { BalancesDiff } from '../BalancesDiff'
import { PercentageValue } from '../PercentageValue'
import { UptimeStatus } from '../UptimeStatus'

type ValidatorsProps = {
validators?: Validator[]
Expand All @@ -37,7 +36,6 @@ export const Validators: FC<ValidatorsProps> = ({ isLoading, limit, pagination,
{ align: TableCellAlign.Right, key: 'delegators', content: t('validator.delegators') },
{ align: TableCellAlign.Right, key: 'commission', content: t('validator.commission') },
{ key: 'status', content: t('common.status') },
{ key: 'uptime', content: t('validator.uptime') },
]
const tableRows = validators?.map((validator, index) => ({
key: validator.entity_address,
Expand Down Expand Up @@ -127,12 +125,6 @@ export const Validators: FC<ValidatorsProps> = ({ isLoading, limit, pagination,
),
key: 'status',
},
{
// TODO: provide uptime when it is implemented in the API
align: TableCellAlign.Right,
content: <UptimeStatus small percentage={94} status={[100, 100, 100, 50]} />,
key: 'uptime',
},
],
}))

Expand Down
17 changes: 1 addition & 16 deletions src/app/pages/ValidatorDetailsPage/UptimeCard.tsx
Original file line number Diff line number Diff line change
@@ -1,24 +1,9 @@
import { FC } from 'react'
import { useTranslation } from 'react-i18next'
import Typography from '@mui/material/Typography'
import { COLORS } from '../../../styles/theme/colors'
import { SnapshotTextCard } from '../../components/Snapshots/SnapshotCard'
import { UptimeStatus } from '../../components/UptimeStatus'

export const UptimeCard: FC = () => {
const { t } = useTranslation()

return (
<SnapshotTextCard
title={t('validator.uptime')}
label={
<Typography sx={{ fontSize: 12, color: COLORS.grayMedium }}>
{t('validator.signedBlocksPercentage')}
</Typography>
}
>
{/* TODO: provide data when API is ready */}
<UptimeStatus percentage={94} status={[100, 100, 100, 50]} />
</SnapshotTextCard>
)
return <SnapshotTextCard title={t('validator.uptime')}>{t('common.missing')}</SnapshotTextCard>
}
5 changes: 0 additions & 5 deletions src/app/pages/ValidatorDetailsPage/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@ import { debondingContainerId, delegatorsContainerId } from './tabAnchors'
import { ValidatorStatusBadge } from './ValidatorStatusBadge'
import { eventsContainerId } from './../../pages/ConsensusAccountDetailsPage/ConsensusAccountEventsCard'
import { PercentageValue } from '../../components/PercentageValue'
import { UptimeStatus } from '../../components/UptimeStatus'
import { BalancesDiff } from '../../components/BalancesDiff'
import { RoundedBalance } from '../../components/RoundedBalance'

Expand Down Expand Up @@ -230,10 +229,6 @@ export const ValidatorDetailsView: FC<{
<dd>
<StatusIcon success={validator.active} error={undefined} />
</dd>
<dt>{t('validator.uptime')}</dt>
<dd>
<UptimeStatus small percentage={94} status={[100, 100, 100, 50]} />
</dd>
</>
)}
</StyledDescriptionList>
Expand Down

0 comments on commit c561385

Please sign in to comment.