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

View File

@ -3,7 +3,7 @@ import useBreadcrumbs, { BreadcrumbsRoute } from 'use-react-router-breadcrumbs'
import {
PATHS,
VALIDATOR_ONBOARDING_SUB_PATHS,
MANAGE_VALIDATOR_SUB_PATHS,
VALIDATOR_MANAGEMENT,
} from '../../../constants'
import BreadcrumbElement from './BreadcrumbElement'
@ -37,15 +37,15 @@ const routes = [
path: `${PATHS.VALIDATOR_MANAGEMENT}/:validatorName`,
children: [
{
path: MANAGE_VALIDATOR_SUB_PATHS.DEFAULT,
path: VALIDATOR_MANAGEMENT.DEFAULT,
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',
LOGS: '/logs',
VALIDATOR_MANAGEMENT: '/validator-management',
MANAGE_VALIDATOR: '/manage-validator',
}
export const VALIDATOR_ONBOARDING_SUB_PATHS = {
@ -45,7 +44,7 @@ export const VALIDATOR_ONBOARDING_SUB_PATHS = {
ACTIVATION: 'activation',
}
export const MANAGE_VALIDATOR_SUB_PATHS = {
export const VALIDATOR_MANAGEMENT = {
DEFAULT: '',
EXIT: 'exit',
MIGRATE: 'migrate',