diff --git a/apps/governance/src/routes/router-config.tsx b/apps/governance/src/routes/router-config.tsx index bbea78836..c7ff06c7a 100644 --- a/apps/governance/src/routes/router-config.tsx +++ b/apps/governance/src/routes/router-config.tsx @@ -229,7 +229,7 @@ const redirects = [ const routerConfig = [ { path: Routes.HOME, - element: , + element: , }, { path: Routes.PROPOSALS, @@ -291,7 +291,7 @@ const routerConfig = [ // Not lazy as loaded when a user first hits the site children: [ { - element: , + element: , index: true, }, { @@ -325,8 +325,11 @@ const routerConfig = [ }, ], }, - { path: 'associate', element: }, - { path: 'disassociate', element: }, + { path: 'associate', element: }, + { + path: 'disassociate', + element: , + }, ], }, { diff --git a/apps/governance/src/routes/staking/associate/associate-page-container.tsx b/apps/governance/src/routes/staking/associate/associate-page-container.tsx index bd3dbccdd..8d08bb547 100644 --- a/apps/governance/src/routes/staking/associate/associate-page-container.tsx +++ b/apps/governance/src/routes/staking/associate/associate-page-container.tsx @@ -1,12 +1,14 @@ import { useEthereumConfig } from '@vegaprotocol/web3'; -import { StakingWalletsContainer } from './components/staking-wallets-container/staking-wallets-container'; +import { StakingWalletsContainer } from './components/staking-wallets-container'; import { AssociatePage } from './associate-page'; import { AssociatePageNoVega } from './associate-page-no-vega'; import { Heading } from '../../../components/heading'; -import React from 'react'; import { useTranslation } from 'react-i18next'; +import { useDocumentTitle } from '../../../hooks/use-document-title'; +import type { RouteChildProps } from '../../index'; -export const AssociateContainer = () => { +export const AssociateContainer = ({ name }: RouteChildProps) => { + useDocumentTitle(name); const { t } = useTranslation(); const { config } = useEthereumConfig(); diff --git a/apps/governance/src/routes/staking/disassociate/index.spec.tsx b/apps/governance/src/routes/staking/disassociate/index.spec.tsx index 1d64391e6..3df807c42 100644 --- a/apps/governance/src/routes/staking/disassociate/index.spec.tsx +++ b/apps/governance/src/routes/staking/disassociate/index.spec.tsx @@ -39,7 +39,7 @@ jest.mock('@vegaprotocol/wallet', () => ({ })); const renderComponent = () => { - return render(); + return render(); }; describe('Disassociate', () => { diff --git a/apps/governance/src/routes/staking/disassociate/index.tsx b/apps/governance/src/routes/staking/disassociate/index.tsx index c36aa2d16..0378e25bc 100644 --- a/apps/governance/src/routes/staking/disassociate/index.tsx +++ b/apps/governance/src/routes/staking/disassociate/index.tsx @@ -3,10 +3,12 @@ import { useWeb3React } from '@web3-react/core'; import { EthConnectPrompt } from '../../../components/eth-connect-prompt'; import { DisassociatePage } from './components/disassociate-page'; import { Heading } from '../../../components/heading'; -import React from 'react'; import { useTranslation } from 'react-i18next'; +import { useDocumentTitle } from '../../../hooks/use-document-title'; +import type { RouteChildProps } from '../../index'; -export const DisassociateContainer = () => { +export const DisassociateContainer = ({ name }: RouteChildProps) => { + useDocumentTitle(name); const { t } = useTranslation(); const { account } = useWeb3React(); const { pubKey } = useVegaWallet();