File tree 2 files changed +4
-22
lines changed
2 files changed +4
-22
lines changed Original file line number Diff line number Diff line change @@ -257,14 +257,7 @@ export class Route<
257
257
258
258
Link : LinkComponent < 'a' , TFullPath > = React . forwardRef (
259
259
( props , ref : React . ForwardedRef < HTMLAnchorElement > ) => {
260
- const router = useRouter ( )
261
- return (
262
- < Link
263
- ref = { ref }
264
- from = { router . routesById [ this . id ] . fullPath as never }
265
- { ...props }
266
- />
267
- )
260
+ return < Link ref = { ref } from = { this . fullPath as never } { ...props } />
268
261
} ,
269
262
) as unknown as LinkComponent < 'a' , TFullPath >
270
263
}
@@ -455,14 +448,7 @@ export class RootRoute<
455
448
456
449
Link : LinkComponent < 'a' , '/' > = React . forwardRef (
457
450
( props , ref : React . ForwardedRef < HTMLAnchorElement > ) => {
458
- const router = useRouter ( )
459
- return (
460
- < Link
461
- ref = { ref }
462
- from = { router . routesById [ this . id ] . fullPath as never }
463
- { ...props }
464
- />
465
- )
451
+ return < Link ref = { ref } from = { this . fullPath } { ...props } />
466
452
} ,
467
453
) as unknown as LinkComponent < 'a' , '/' >
468
454
}
Original file line number Diff line number Diff line change @@ -243,9 +243,7 @@ export class Route<
243
243
}
244
244
245
245
Link : LinkComponent < 'a' , TFullPath > = ( props ) => {
246
- const router = useRouter ( )
247
- const fullPath = router . routesById [ this . id as string ] . fullPath
248
- return < Link from = { fullPath as never } { ...props } />
246
+ return < Link from = { this . fullPath } { ...props } />
249
247
}
250
248
}
251
249
@@ -430,9 +428,7 @@ export class RootRoute<
430
428
}
431
429
432
430
Link : LinkComponent < 'a' , '/' > = ( props ) => {
433
- const router = useRouter ( )
434
- const fullPath = router . routesById [ this . id as string ] . fullPath
435
- return < Link from = { fullPath as never } { ...props } />
431
+ return < Link from = { this . fullPath } { ...props } />
436
432
}
437
433
}
438
434
You can’t perform that action at this time.
0 commit comments