title: don't work Routes, Route, Navigate in the package react-router-dom
body: <p>I have been working with the node not so long ago and I do not know all the subtleties. Using the trial and output method, I realized that it does not display data written in the Routes, Route, Navigate tags that I import from the react-router-dom package. Tell me how can I solve this?</p>
  <pre><code>import React from 'react';
  import {Routes, Route, Navigate} from 'react-router-dom';
  import {LinksPage} from './pages/LinksPage';
  import {CreatePage} from './pages/CreatePage';
  import {DetailPage} from './pages/DetailPage';
  import {AuthPage} from './pages/AuthPage';
   
  export const useRoutes = isAuthenticated =&gt; {
      if (isAuthenticated){
          return(
              &lt;Routes&gt;
                  &lt;Route path=&quot;/links&quot; element={&lt;LinksPage /&gt;}&gt;&lt;/Route&gt;
                  &lt;Route path=&quot;/create&quot;  element={&lt;CreatePage /&gt;}&gt;&lt;/Route&gt;
                  &lt;Route path=&quot;/detail/:id&quot;  element={&lt;DetailPage /&gt;}&gt;&lt;/Route&gt;
                  &lt;Navigate to=&quot;/create&quot;/&gt;
              &lt;/Routes&gt;
          )
      }
   
      return(
          &lt;Routes&gt;
              &lt;Route path=&quot;/&quot; element={&lt;AuthPage /&gt;}&gt;&lt;/Route&gt;
              &lt;Navigate to=&quot;/&quot; /&gt;
          &lt;/Routes&gt;
      )
  }
  </code></pre>