Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(ui): update route IDs for non-nested validator routes #323

Merged
merged 2 commits into from
Oct 30, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 10 additions & 6 deletions ui/src/routeTree.gen.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,21 +19,25 @@ import { Route as ValidatorsValidatorIdImport } from './routes/validators_.$vali
// Create/Update Routes

const ValidatorsRoute = ValidatorsImport.update({
id: '/validators',
path: '/validators',
getParentRoute: () => rootRoute,
} as any)

const AddRoute = AddImport.update({
id: '/add',
path: '/add',
getParentRoute: () => rootRoute,
} as any)

const IndexRoute = IndexImport.update({
id: '/',
path: '/',
getParentRoute: () => rootRoute,
} as any)

const ValidatorsValidatorIdRoute = ValidatorsValidatorIdImport.update({
id: '/validators_/$validatorId',
path: '/validators/$validatorId',
getParentRoute: () => rootRoute,
} as any)
Expand Down Expand Up @@ -63,8 +67,8 @@ declare module '@tanstack/react-router' {
preLoaderRoute: typeof ValidatorsImport
parentRoute: typeof rootRoute
}
'/validators/$validatorId': {
id: '/validators/$validatorId'
'/validators_/$validatorId': {
id: '/validators_/$validatorId'
path: '/validators/$validatorId'
fullPath: '/validators/$validatorId'
preLoaderRoute: typeof ValidatorsValidatorIdImport
Expand Down Expand Up @@ -94,15 +98,15 @@ export interface FileRoutesById {
'/': typeof IndexRoute
'/add': typeof AddRoute
'/validators': typeof ValidatorsRoute
'/validators/$validatorId': typeof ValidatorsValidatorIdRoute
'/validators_/$validatorId': typeof ValidatorsValidatorIdRoute
}

export interface FileRouteTypes {
fileRoutesByFullPath: FileRoutesByFullPath
fullPaths: '/' | '/add' | '/validators' | '/validators/$validatorId'
fileRoutesByTo: FileRoutesByTo
to: '/' | '/add' | '/validators' | '/validators/$validatorId'
id: '__root__' | '/' | '/add' | '/validators' | '/validators/$validatorId'
id: '__root__' | '/' | '/add' | '/validators' | '/validators_/$validatorId'
fileRoutesById: FileRoutesById
}

Expand Down Expand Up @@ -135,7 +139,7 @@ export const routeTree = rootRoute
"/",
"/add",
"/validators",
"/validators/$validatorId"
"/validators_/$validatorId"
]
},
"/": {
Expand All @@ -147,7 +151,7 @@ export const routeTree = rootRoute
"/validators": {
"filePath": "validators.tsx"
},
"/validators/$validatorId": {
"/validators_/$validatorId": {
"filePath": "validators_.$validatorId.tsx"
}
}
Expand Down
2 changes: 1 addition & 1 deletion ui/src/routes/validators_.$validatorId.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import { PageMain } from '@/components/PageMain'
import { ValidatorDetails } from '@/components/ValidatorDetails'
import { DetailsHeader } from '@/components/ValidatorDetails/DetailsHeader'

export const Route = createFileRoute('/validators/$validatorId')({
export const Route = createFileRoute('/validators_/$validatorId')({
beforeLoad: () => {
return {
validatorQueryOptions,
Expand Down