()
| 37 | }) |
| 38 | |
| 39 | function RootComponent() { |
| 40 | return ( |
| 41 | <> |
| 42 | <div className="p-2 flex gap-2 text-lg"> |
| 43 | <Link |
| 44 | to="/" |
| 45 | activeProps={{ |
| 46 | className: 'font-bold', |
| 47 | }} |
| 48 | activeOptions={{ exact: true }} |
| 49 | > |
| 50 | Home |
| 51 | </Link>{' '} |
| 52 | <Link |
| 53 | to="/posts" |
| 54 | activeProps={{ |
| 55 | className: 'font-bold', |
| 56 | }} |
| 57 | > |
| 58 | Posts |
| 59 | </Link>{' '} |
| 60 | <Link |
| 61 | to="/route-a" |
| 62 | activeProps={{ |
| 63 | className: 'font-bold', |
| 64 | }} |
| 65 | > |
| 66 | Pathless Layout |
| 67 | </Link>{' '} |
| 68 | <Link |
| 69 | // @ts-expect-error |
| 70 | to="/this-route-does-not-exist" |
| 71 | activeProps={{ |
| 72 | className: 'font-bold', |
| 73 | }} |
| 74 | > |
| 75 | This Route Does Not Exist |
| 76 | </Link> |
| 77 | </div> |
| 78 | <hr /> |
| 79 | <Outlet /> |
| 80 | <ReactQueryDevtools buttonPosition="top-right" /> |
| 81 | <TanStackRouterDevtools position="bottom-right" /> |
| 82 | </> |
| 83 | ) |
| 84 | } |
| 85 | |
| 86 | const indexRoute = createRoute({ |
| 87 | getParentRoute: () => rootRoute, |
nothing calls this directly
no outgoing calls
no test coverage detected