@tanstack/react-router 0.0.1-beta.242 → 0.0.1-beta.243
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/cjs/useNavigate.js +4 -3
- package/build/cjs/useNavigate.js.map +1 -1
- package/build/esm/index.js +4 -3
- package/build/esm/index.js.map +1 -1
- package/build/stats-html.html +1 -1
- package/build/stats-react.json +355 -355
- package/build/umd/index.development.js +4 -3
- package/build/umd/index.development.js.map +1 -1
- package/build/umd/index.production.js +1 -1
- package/build/umd/index.production.js.map +1 -1
- package/package.json +2 -2
- package/src/useNavigate.tsx +3 -2
|
@@ -3110,12 +3110,13 @@
|
|
|
3110
3110
|
const {
|
|
3111
3111
|
navigate
|
|
3112
3112
|
} = useRouter();
|
|
3113
|
-
const
|
|
3114
|
-
strict: false
|
|
3113
|
+
const matchPathname = useMatch({
|
|
3114
|
+
strict: false,
|
|
3115
|
+
select: s => s.pathname
|
|
3115
3116
|
});
|
|
3116
3117
|
return React__namespace.useCallback(opts => {
|
|
3117
3118
|
return navigate({
|
|
3118
|
-
from: opts?.to ?
|
|
3119
|
+
from: opts?.to ? matchPathname : undefined,
|
|
3119
3120
|
...defaultOpts,
|
|
3120
3121
|
...opts
|
|
3121
3122
|
});
|