fix(constants): rename validators routes

This commit is contained in:
RadoslavDimchev 2024-04-29 18:54:24 +03:00 committed by Emil Ivanichkov
parent b66e5e3763
commit 674fe36324
3 changed files with 11 additions and 12 deletions

View File

@ -25,7 +25,7 @@ import {
apiKey, apiKey,
PATHS, PATHS,
VALIDATOR_ONBOARDING_SUB_PATHS, VALIDATOR_ONBOARDING_SUB_PATHS,
MANAGE_VALIDATOR_SUB_PATHS, VALIDATOR_MANAGEMENT,
} from './constants' } from './constants'
import './App.css' import './App.css'
@ -139,10 +139,10 @@ const router = createBrowserRouter([
path: `${PATHS.VALIDATOR_MANAGEMENT}/:validatorName`, path: `${PATHS.VALIDATOR_MANAGEMENT}/:validatorName`,
element: <ManageValidator />, element: <ManageValidator />,
children: [ children: [
{ path: MANAGE_VALIDATOR_SUB_PATHS.DEFAULT, element: <DefaultPanel /> }, { path: VALIDATOR_MANAGEMENT.DEFAULT, element: <DefaultPanel /> },
{ path: MANAGE_VALIDATOR_SUB_PATHS.EXIT, element: <ExitPanel /> }, { path: VALIDATOR_MANAGEMENT.EXIT, element: <ExitPanel /> },
{ path: MANAGE_VALIDATOR_SUB_PATHS.MIGRATE, element: <MigratePanel /> }, { path: VALIDATOR_MANAGEMENT.MIGRATE, element: <MigratePanel /> },
{ path: MANAGE_VALIDATOR_SUB_PATHS.DEPOSIT, element: <DepositPanel /> }, { path: VALIDATOR_MANAGEMENT.DEPOSIT, element: <DepositPanel /> },
], ],
}, },
]) ])

View File

@ -3,7 +3,7 @@ import useBreadcrumbs, { BreadcrumbsRoute } from 'use-react-router-breadcrumbs'
import { import {
PATHS, PATHS,
VALIDATOR_ONBOARDING_SUB_PATHS, VALIDATOR_ONBOARDING_SUB_PATHS,
MANAGE_VALIDATOR_SUB_PATHS, VALIDATOR_MANAGEMENT,
} from '../../../constants' } from '../../../constants'
import BreadcrumbElement from './BreadcrumbElement' import BreadcrumbElement from './BreadcrumbElement'
@ -37,15 +37,15 @@ const routes = [
path: `${PATHS.VALIDATOR_MANAGEMENT}/:validatorName`, path: `${PATHS.VALIDATOR_MANAGEMENT}/:validatorName`,
children: [ children: [
{ {
path: MANAGE_VALIDATOR_SUB_PATHS.DEFAULT, path: VALIDATOR_MANAGEMENT.DEFAULT,
breadcrumb: 'Manage Validator', breadcrumb: 'Manage Validator',
}, },
{ path: MANAGE_VALIDATOR_SUB_PATHS.EXIT }, { path: VALIDATOR_MANAGEMENT.EXIT },
{ {
path: MANAGE_VALIDATOR_SUB_PATHS.MIGRATE, path: VALIDATOR_MANAGEMENT.MIGRATE,
}, },
{ {
path: MANAGE_VALIDATOR_SUB_PATHS.DEPOSIT, path: VALIDATOR_MANAGEMENT.DEPOSIT,
}, },
], ],
}, },

View File

@ -28,7 +28,6 @@ export const PATHS = {
DASHBOARD: '/dashboard', DASHBOARD: '/dashboard',
LOGS: '/logs', LOGS: '/logs',
VALIDATOR_MANAGEMENT: '/validator-management', VALIDATOR_MANAGEMENT: '/validator-management',
MANAGE_VALIDATOR: '/manage-validator',
} }
export const VALIDATOR_ONBOARDING_SUB_PATHS = { export const VALIDATOR_ONBOARDING_SUB_PATHS = {
@ -45,7 +44,7 @@ export const VALIDATOR_ONBOARDING_SUB_PATHS = {
ACTIVATION: 'activation', ACTIVATION: 'activation',
} }
export const MANAGE_VALIDATOR_SUB_PATHS = { export const VALIDATOR_MANAGEMENT = {
DEFAULT: '', DEFAULT: '',
EXIT: 'exit', EXIT: 'exit',
MIGRATE: 'migrate', MIGRATE: 'migrate',