Skip to content
Source
Sign inSign up
TanStack/router

fix: correctly handle client-side vs server-side redirects with rewrites #5330

Mergedschiller-manuel(GitHub profile, opens in a new tab)merged 1 commit intomain fromrefs/pull/5330/headmerged by schiller-manuel(GitHub profile, opens in a new tab)

Showing 6 changed files with 26 additions and 1 deletion (loading 2).

x
0 of 6 viewed, 6 left
e2e/react-start/custom-basepath/src/routeTree.gen.tsModified
View file
1 addition and 1 deletione2e/react-start/custom-basepath/src/routes/posts.$postId.tsxModified
View file
@@ -21,7 +21,7 @@
const post = Route.useLoaderData()
​
return (
- <div className="space-y-2">
+ <div className="space-y-2" data-testid="post-view">
<h4 className="text-xl font-bold underline">{post.title}</h4>
<div className="text-sm">{post.body}</div>
<Link
15 additions and 0 deletionse2e/react-start/custom-basepath/src/routes/redirect/index.tsxAdded
View file
@@ -0,0 +1,15 @@
+import { Link, createFileRoute } from '@tanstack/react-router'
+​
+export const Route = createFileRoute('/redirect/')({
+ component: RouteComponent,
+})
+​