title: React router V6 vs V5 - login?redirect=my_other_page
body: <p>In react router V5, you can use</p>
  <p><code>history.push('/login?redirect=other_page')</code></p>
  <p>to redirect a user either to <code>'/login'</code>, or to <code>'/other_page'</code> (if already logged in )</p>
  <p>What is the equivalent in react router V6 with useNavigate ?</p>
  <p><code>navigate('/login?redirect=other_page')</code></p>
  <p>doesn't work as intended.</p>
  <p>When the user is logged-in, it returns the path <code>'/login/other_page'</code> instead of <code>'/other_page'</code>.</p>