()
| 321 | }) |
| 322 | |
| 323 | function RouteComponent() { |
| 324 | const routeParams = Route.useParams() |
| 325 | const matchRoute = useMatchRoute() |
| 326 | const matchRouteMatch = matchRoute({ |
| 327 | to: path, |
| 328 | }) |
| 329 | |
| 330 | return ( |
| 331 | <div> |
| 332 | <h1 data-testid="heading">{name}</h1> |
| 333 | <div> |
| 334 | Params{' '} |
| 335 | <span data-testid="params">{JSON.stringify(routeParams())}</span> |
| 336 | Matches{' '} |
| 337 | <span data-testid="matches"> |
| 338 | {JSON.stringify(matchRouteMatch())} |
| 339 | </span> |
| 340 | </div> |
| 341 | </div> |
| 342 | ) |
| 343 | } |
| 344 | |
| 345 | const router = createRouter({ |
| 346 | routeTree: rootRoute.addChildren([Route]), |
nothing calls this directly
no test coverage detected