()
| 36 | const rootRoute = createRootRoute() |
| 37 | |
| 38 | const IndexComponent = () => { |
| 39 | const navigate = useNavigate() |
| 40 | |
| 41 | useBlocker({ shouldBlockFn: () => false }) |
| 42 | |
| 43 | return ( |
| 44 | <> |
| 45 | <h1>Index</h1> |
| 46 | <button onClick={() => navigate({ to: '/' })}>Index</button> |
| 47 | <button onClick={() => navigate({ to: '/posts' })}>Posts</button> |
| 48 | </> |
| 49 | ) |
| 50 | } |
| 51 | |
| 52 | const indexRoute = createRoute({ |
| 53 | getParentRoute: () => rootRoute, |
nothing calls this directly
no test coverage detected