()
| 26 | const rootRoute = createRootRoute() |
| 27 | |
| 28 | const IndexComponent = () => { |
| 29 | const navigate = useNavigate() |
| 30 | |
| 31 | useBlocker({ shouldBlockFn: () => false }) |
| 32 | |
| 33 | return ( |
| 34 | <> |
| 35 | <h1>Index</h1> |
| 36 | <button onClick={() => navigate({ to: '/' })}>Index</button> |
| 37 | <button onClick={() => navigate({ to: '/posts' })}>Posts</button> |
| 38 | </> |
| 39 | ) |
| 40 | } |
| 41 | |
| 42 | const indexRoute = createRoute({ |
| 43 | getParentRoute: () => rootRoute, |
nothing calls this directly
no test coverage detected