File tree Expand file tree Collapse file tree 1 file changed +13
-0
lines changed Expand file tree Collapse file tree 1 file changed +13
-0
lines changed Original file line number Diff line number Diff line change @@ -5,6 +5,7 @@ import { BiBookAlt } from 'react-icons/bi'
5
5
import { PiRocketLaunchDuotone , PiTreeStructureBold } from 'react-icons/pi'
6
6
import { TbServerBolt } from 'react-icons/tb'
7
7
import { twMerge } from 'tailwind-merge'
8
+ import { redirect } from '@tanstack/react-router'
8
9
9
10
const repo = 'tanstack/router'
10
11
@@ -150,4 +151,16 @@ export const startProject = {
150
151
) ,
151
152
} ,
152
153
] ,
154
+ handleRedirects : ( href ) => {
155
+ // Redirect from /api-routes to /server-routes
156
+ if (
157
+ href . match (
158
+ / \/ s t a r t \/ ( l a t e s t | v 1 ) \/ d o c s \/ f r a m e w o r k \/ ( r e a c t | s o l i d ) \/ a p i - r o u t e s /
159
+ )
160
+ ) {
161
+ throw redirect ( {
162
+ href : href . replace ( '/api-routes' , '/server-routes' ) ,
163
+ } )
164
+ }
165
+ } ,
153
166
} satisfies Library
You can’t perform that action at this time.
0 commit comments