title: Attempted import error: 'Navigate' is not exported from 'react-router-dom'
body: <p>pls help me to deal with this error Attempted import error: 'Navigate' is not exported from 'react-router-dom' my react-router-dom version is 4.1.1 pls don't tell me how update to 5v or v6 because  in that verisons i am facing many errors so pls tell how to fix this error in 4.1.1 verison of react-router-dom the error is Attempted import error: 'Navigate' is not exported from 'react-router-dom'. you all can also see the img of the error <a href="https://i.stack.imgur.com/Q6NtH.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/Q6NtH.png" alt="error img" /></a></p>
  <h1>my code here</h1>
  <pre><code>import {  Navigate, useLocation } from &quot;react-router-dom&quot;;
  import { useAppSelector } from &quot;../app/hooks&quot;;
  
  export function PrivateRoute({ children }: { children: JSX.Element }) {
    const { isAuthenticated } = useAppSelector((state) =&gt; state.auth);
    const location = useLocation();
    return isAuthenticated ? (
      children
    ) : (
      &lt;Navigate to=&quot;/login&quot; state={{ from: location }} /&gt;
    );
  }
  </code></pre>