title: react-router-dom v6 issue with gh-pages
body: <p>I am having an issue with githubpages with react-router-dom v6</p>
  <p>my package.json</p>
  <pre class="lang-json prettyprint-override"><code>
  {
      &quot;name&quot;: &quot;weatherly-app&quot;,
      &quot;version&quot;: &quot;0.1.0&quot;,
      &quot;homepage&quot;: &quot;https://ahmedgaafer.github.io/weatherly-app/&quot;,
  
      &quot;dependencies&quot;: {
          &quot;react&quot;: &quot;^18.1.0&quot;,
          &quot;react-dom&quot;: &quot;^18.1.0&quot;,
          &quot;react-router-dom&quot;: &quot;^6.3.0&quot;,
          &quot;react-scripts&quot;: &quot;5.0.1&quot;,
      },
      &quot;scripts&quot;: {
          &quot;predeploy&quot;: &quot;npm run build&quot;,
          &quot;deploy&quot;: &quot;gh-pages -d build -r https://github.com/ahmedgaafer/weatherly-app&quot;,
          &quot;start&quot;: &quot;react-scripts start&quot;,
          &quot;build&quot;: &quot;react-scripts build&quot;,
          &quot;test&quot;: &quot;react-scripts test&quot;,
          &quot;eject&quot;: &quot;react-scripts eject&quot;
      },
      
      
      &quot;devDependencies&quot;: {
          &quot;gh-pages&quot;: &quot;^4.0.0&quot;
      }
  }
  
  
  </code></pre>
  <p>my routing file.js</p>
  <pre class="lang-js prettyprint-override"><code>
  root.render(
      &lt;React.StrictMode&gt;
          &lt;Provider store={store}&gt;
              &lt;BrowserRouter&gt;
                  &lt;Routes&gt;
                      &lt;Route path=&quot;/&quot; exact element={&lt;LandingPage /&gt;} /&gt;
                      &lt;Route path=&quot;/dashboard&quot; element={&lt;Dashboard /&gt;} /&gt;
                  &lt;/Routes&gt;
              &lt;/BrowserRouter&gt;
          &lt;/Provider&gt;
      &lt;/React.StrictMode&gt;,
  );
  </code></pre>
  <p>when I run the <code>npm run deploy</code> command and try to view the page
  the component in the routes are not rendered and an empty page is displayed
  I know the code is deployed correctly because the CSS background-colour is displayed in the correct color</p>
  <p>The only issue is that the components does not render</p>
  <p>LINK TO THE APP :  <a href="https://ahmedgaafer.github.io/weatherly-app/" rel="nofollow noreferrer">https://ahmedgaafer.github.io/weatherly-app/</a></p>