Skip to content

Commit e9aa00a

Browse files
authored
fix tanstack router useHref example (#7148)
1 parent 8a7cb15 commit e9aa00a

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

packages/dev/docs/pages/react-aria/routing.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -288,7 +288,7 @@ function RootRoute() {
288288
return (
289289
<RouterProvider
290290
navigate={(to, options) => router.navigate({to, ...options})}
291-
useHref={to => router.buildLocation(to).href}>
291+
useHref={to => router.buildLocation({to}).href}>
292292
{/* ...*/}
293293
</RouterProvider>
294294
);

packages/dev/docs/pages/react-spectrum/routing.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -292,7 +292,7 @@ function RootRoute() {
292292
theme={defaultTheme}
293293
router={{
294294
navigate: (to, options) => router.navigate({to, ...options}),
295-
useHref: to => router.buildLocation(to).href
295+
useHref: to => router.buildLocation({to}).href
296296
}}>
297297
{/* ...*/}
298298
</Provider>

0 commit comments

Comments
 (0)