Skip to content
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
26 changes: 26 additions & 0 deletions app/routeTree.gen.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ import { Route as LoginImport } from './routes/login'
import { Route as DashboardImport } from './routes/dashboard'
import { Route as LibrariesRouteImport } from './routes/_libraries/route'
import { Route as LibraryIdRouteImport } from './routes/$libraryId/route'
import { Route as StatsIndexImport } from './routes/stats/index'
import { Route as LibrariesIndexImport } from './routes/_libraries/index'
import { Route as LibraryIdIndexImport } from './routes/$libraryId/index'
import { Route as LibrariesTermsImport } from './routes/_libraries/terms'
Expand Down Expand Up @@ -85,6 +86,12 @@ const LibraryIdRouteRoute = LibraryIdRouteImport.update({
getParentRoute: () => rootRoute,
} as any)

const StatsIndexRoute = StatsIndexImport.update({
id: '/stats/',
path: '/stats/',
getParentRoute: () => rootRoute,
} as any)

const LibrariesIndexRoute = LibrariesIndexImport.update({
id: '/',
path: '/',
Expand Down Expand Up @@ -399,6 +406,13 @@ declare module '@tanstack/react-router' {
preLoaderRoute: typeof LibrariesIndexImport
parentRoute: typeof LibrariesRouteImport
}
'/stats/': {
id: '/stats/'
path: '/stats'
fullPath: '/stats'
preLoaderRoute: typeof StatsIndexImport
parentRoute: typeof rootRoute
}
'/$libraryId/$version/docs': {
id: '/$libraryId/$version/docs'
path: '/docs'
Expand Down Expand Up @@ -671,6 +685,7 @@ export interface FileRoutesByFullPath {
'/terms': typeof LibrariesTermsRoute
'/$libraryId/': typeof LibraryIdIndexRoute
'/': typeof LibrariesIndexRoute
'/stats': typeof StatsIndexRoute
'/$libraryId/$version/docs': typeof LibraryIdVersionDocsRouteWithChildren
'/blog/$': typeof LibrariesBlogSplatRoute
'/blog/': typeof LibrariesBlogIndexRoute
Expand Down Expand Up @@ -707,6 +722,7 @@ export interface FileRoutesByTo {
'/terms': typeof LibrariesTermsRoute
'/$libraryId': typeof LibraryIdIndexRoute
'/': typeof LibrariesIndexRoute
'/stats': typeof StatsIndexRoute
'/blog/$': typeof LibrariesBlogSplatRoute
'/blog': typeof LibrariesBlogIndexRoute
'/stats/npm': typeof StatsNpmIndexRoute
Expand Down Expand Up @@ -746,6 +762,7 @@ export interface FileRoutesById {
'/_libraries/terms': typeof LibrariesTermsRoute
'/$libraryId/': typeof LibraryIdIndexRoute
'/_libraries/': typeof LibrariesIndexRoute
'/stats/': typeof StatsIndexRoute
'/$libraryId/$version/docs': typeof LibraryIdVersionDocsRouteWithChildren
'/_libraries/blog/$': typeof LibrariesBlogSplatRoute
'/_libraries/blog/': typeof LibrariesBlogIndexRoute
Expand Down Expand Up @@ -787,6 +804,7 @@ export interface FileRouteTypes {
| '/terms'
| '/$libraryId/'
| '/'
| '/stats'
| '/$libraryId/$version/docs'
| '/blog/$'
| '/blog/'
Expand Down Expand Up @@ -822,6 +840,7 @@ export interface FileRouteTypes {
| '/terms'
| '/$libraryId'
| '/'
| '/stats'
| '/blog/$'
| '/blog'
| '/stats/npm'
Expand Down Expand Up @@ -859,6 +878,7 @@ export interface FileRouteTypes {
| '/_libraries/terms'
| '/$libraryId/'
| '/_libraries/'
| '/stats/'
| '/$libraryId/$version/docs'
| '/_libraries/blog/$'
| '/_libraries/blog/'
Expand Down Expand Up @@ -889,6 +909,7 @@ export interface RootRouteChildren {
LoginRoute: typeof LoginRoute
MerchRoute: typeof MerchRoute
SponsorsEmbedRoute: typeof SponsorsEmbedRoute
StatsIndexRoute: typeof StatsIndexRoute
StatsNpmIndexRoute: typeof StatsNpmIndexRoute
}

Expand All @@ -899,6 +920,7 @@ const rootRouteChildren: RootRouteChildren = {
LoginRoute: LoginRoute,
MerchRoute: MerchRoute,
SponsorsEmbedRoute: SponsorsEmbedRoute,
StatsIndexRoute: StatsIndexRoute,
StatsNpmIndexRoute: StatsNpmIndexRoute,
}

Expand All @@ -918,6 +940,7 @@ export const routeTree = rootRoute
"/login",
"/merch",
"/sponsors-embed",
"/stats/",
"/stats/npm/"
]
},
Expand Down Expand Up @@ -1010,6 +1033,9 @@ export const routeTree = rootRoute
"filePath": "_libraries/index.tsx",
"parent": "/_libraries"
},
"/stats/": {
"filePath": "stats/index.tsx"
},
"/$libraryId/$version/docs": {
"filePath": "$libraryId/$version.docs.tsx",
"parent": "/$libraryId/$version",
Expand Down
7 changes: 7 additions & 0 deletions app/routes/stats/index.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
import { createFileRoute, redirect } from '@tanstack/react-router'

export const Route = createFileRoute('/stats/')({
beforeLoad: () => {
throw redirect({ to: '/stats/npm' })
},
})
Loading