-
-
Notifications
You must be signed in to change notification settings - Fork 10.2k
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: relative navigation from index/pathless routes #8954
Conversation
* fix: relative navigation from index routes * fix: tests
<Route element={<Outlet />}> | ||
<Route | ||
path="page" | ||
element={<Navigate to="../../about" />} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@ryanflorence Quick double check here that this double ../..
would be the expected relative path to the /about
route?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
<Route path="about" />
<Route path="home" element={<Outlet />}>
<Route element={<Outlet />}>
<Route element={<Outlet />}>
<Route element={<Outlet />}>
<Route
path="page"
element={<Navigate to="../../about" />}
/>
Should ignore all the pathless routes, so essentially we're talking about this:
<Route path="about" />
<Route path="home" element={<Outlet />}>
<Route
path="page"
element={<Navigate to="../../about" />}
/>
..
goes up to/home
route..
x2 goes up to/
about
goes to/about
So yeah, that sounds right!
Continuation of #8697
Closes #8350