Redirect based on tanstack query result in `beforeLoad` - TanStack