title: React Router V6 Not rendering pages
body: <p>I am trying to get my routes working from my nav bar but no pages get rendered. My follow is as follows:</p>
  <p>App.tsx:</p>
  <pre><code>  &lt;div&gt;
      &lt;Routes&gt;
        &lt;Route path={login} element={&lt;LoginPage /&gt;} /&gt;
      &lt;/Routes&gt;
      &lt;Routes&gt;
        &lt;Route path='/' element={&lt;Dashboard /&gt;}/&gt;
      &lt;/Routes&gt;
    &lt;/div&gt;
  </code></pre>
  <p>Dashboard.tsx:</p>
  <pre><code>export default function Dashboard() {
  
    const mainPanel = React.createRef();
  
  
    const getRoutes = (routes: any) =&gt; {
      return routes.map((prop: any, key: number) =&gt; {
        if (prop.collapse) {
          return getRoutes(prop.views);
        }
  
        if (prop.layout) {
          console.log(prop.component)
          console.log(key)
          return (
            &lt;Route
              path={prop.layout + prop.path}
              element={prop.component}
              key={key}
            /&gt;
          );
        } else {
          return null;
        }
      });
    };
  
  
    return (
      &lt;div className=&quot;wrapper&quot;&gt;
        &lt;Sidebar activeColor={&quot;danger&quot;} protectedRoutes={ProtectedRoutes} LoggedInUser='Test' AccountRoutes={AccountRoute} /&gt;
        &lt;div className=&quot;main-panel&quot; ref={mainPanel as React.RefObject&lt;HTMLDivElement&gt;}&gt;
          &lt;TopNavbar /&gt;
          &lt;Routes&gt;
            {getRoutes(ProtectedRoutes)}
          &lt;/Routes&gt;
        &lt;/div&gt;
        &lt;Outlet /&gt;
      &lt;/div&gt;
    );
  }
  </code></pre>
  <p>and my Routes.ts:</p>
  <pre><code>export const ProtectedRoutes : ProtectedRoute[] = [
      {
          path: &quot;dashboard&quot;,
          name: &quot;Dashboard&quot;,
          icon: &quot;nc-icon nc-paper&quot;,
          component: DashboardPage,
          layout: &quot;/&quot;,
      },
  ]
  </code></pre>
  <p>The follow was working but for some reason I am getting redirected to a blank page and in my console it says &quot;No Routes Matched Location /dashboard&quot;</p>
  <p>Even without the Nav Bar if I go to the URL directly, it still does not work.</p>