Skip to content

Commit

Permalink
Remove headings from staking subpages
Browse files Browse the repository at this point in the history
  • Loading branch information
lukaw3d committed Jul 16, 2024
1 parent 9503cb6 commit 4203665
Show file tree
Hide file tree
Showing 6 changed files with 3 additions and 19 deletions.
1 change: 1 addition & 0 deletions .changelog/2009.trivial.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Remove headings from staking subpages
Original file line number Diff line number Diff line change
Expand Up @@ -58,10 +58,7 @@ export function StakeSubnavigation() {
gap="none"
wrap
>
<NavItem
label={t('account.subnavigation.validators', 'Validators')}
route={`/account/${address}/stake`}
/>
<NavItem label={t('common.validators', 'Validators')} route={`/account/${address}/stake`} />

<NavItem
counter={stake.delegations?.length}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,22 +1,18 @@
import { Header } from 'app/components/Header'
import { selectActiveDelegations } from 'app/state/staking/selectors'
import { Box } from 'grommet/es6/components/Box'
import React from 'react'
import { useTranslation } from 'react-i18next'
import { useSelector } from 'react-redux'

import { DelegationList } from '.'
import { StakeSubnavigation } from '../../../AccountPage/Features/StakeSubnavigation'

export const ActiveDelegationList = () => {
const { t } = useTranslation()
const delegations = useSelector(selectActiveDelegations)
return (
<>
<StakeSubnavigation />
<Box as="section" data-testid="active-delegations">
<Box pad="medium" background="background-front">
<Header>{t('delegations.activeDelegations', 'Active delegations')}</Header>
<DelegationList type="active" delegations={delegations ?? []} />
</Box>
</Box>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,22 +1,17 @@
import { Header } from 'app/components/Header'
import { selectDebondingDelegations } from 'app/state/staking/selectors'
import { Box } from 'grommet/es6/components/Box'
import React from 'react'
import { useTranslation } from 'react-i18next'
import { useSelector } from 'react-redux'

import { DelegationList } from '.'
import { StakeSubnavigation } from '../../../AccountPage/Features/StakeSubnavigation'

export const DebondingDelegationList = () => {
const { t } = useTranslation()
const delegations = useSelector(selectDebondingDelegations)
return (
<>
<StakeSubnavigation />
<Box as="section" data-testid="debonding-delegations">
<Box pad="medium" background="background-front">
<Header>{t('delegations.debondingDelegations', 'Debonding delegations')}</Header>
<DelegationList type="debonding" delegations={delegations ?? []} />
</Box>
</Box>
Expand Down
2 changes: 0 additions & 2 deletions src/app/pages/StakingPage/Features/ValidatorList/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
*
*/
import { AmountFormatter } from 'app/components/AmountFormatter'
import { Header } from 'app/components/Header'
import { ErrorFormatter } from 'app/components/ErrorFormatter'
import { ShortAddress } from 'app/components/ShortAddress'
import { ValidatorStatus } from 'app/pages/StakingPage/Features/ValidatorList/ValidatorStatus'
Expand Down Expand Up @@ -119,7 +118,6 @@ export const ValidatorList = memo((props: Props) => {
<StakeSubnavigation />
<Box as="section" data-testid="validators-list">
<Box pad="medium" background="background-front">
<Header>{t('common.validators', 'Validators')}</Header>
{updateValidatorsError && (
<p>
<span>{t('account.validator.loadingError', "Couldn't load validators.")}</span>
Expand Down
5 changes: 1 addition & 4 deletions src/locales/en/translation.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,7 @@
"activeDelegations": "Staked",
"debondingDelegations": "Debonding",
"mobileActiveDelegations": "Staked",
"mobileDebondingDelegations": "Debonding",
"validators": "Validators"
"mobileDebondingDelegations": "Debonding"
},
"summary": {
"activity": "Activity",
Expand Down Expand Up @@ -136,8 +135,6 @@
"thisIsYourPhrase": "This is your mnemonic"
},
"delegations": {
"activeDelegations": "Active delegations",
"debondingDelegations": "Debonding delegations",
"debondingTimeEnd": "End of debonding",
"delegatedAmount": "Delegated amount",
"loadingError": "Couldn't load delegations.",
Expand Down

0 comments on commit 4203665

Please sign in to comment.