title: Is there any method to open page using a React Router v6 on button click
body: <p>Here is the App.js file which will include the main page in which i have a single button of continue. The continue button will led a user to the home page but unfortunately instead of directing a user to the home page it is opening the homepage just after the Continue button</p>
  <pre><code>function App() {
    return (  
       &lt;div className=&quot;App&quot;  &gt; 
    &lt;MainPage/&gt;
    &lt;Routes&gt;
            &lt;Route path=&quot;home&quot; element={&lt;Home /&gt;} /&gt;
            &lt;Route path=&quot;discover&quot; element={&lt;Discover /&gt;} /&gt;
            &lt;Route path=&quot;shop/skincare&quot; element={&lt;SkinCare /&gt;} /&gt;
            &lt;Route path=&quot;shop/fragnance&quot; element={&lt;Fragnance /&gt;} /&gt;
            &lt;Route path=&quot;shop/makeup&quot; element={&lt;Makeup /&gt;} /&gt;
            &lt;Route path=&quot;shop/hair&quot; element={&lt;Hair /&gt;} /&gt;
            &lt;Route path=&quot;details&quot; element={&lt;DetailsPage /&gt;} /&gt;
            &lt;Route path=&quot;bucket&quot; element={&lt;Bucket /&gt;} /&gt;     
  &lt;/Routes&gt;
    &lt;/div&gt;
    );
  }
  
  export default App;
  </code></pre>
  <p>It is the MainPage component which just contain a background image and a conitnue button
  export default function MainPage() {
  return (</p>
  <pre><code>    &lt;div&gt;
         &lt;div class=&quot;text-center&quot; style={{padding:&quot;22%&quot;}}&gt;
              &lt;button type=&quot;button&quot;  class=&quot;btn btn-secondary&quot; style={{backgroundColor:&quot;black&quot;}}&gt;&lt;Link to=&quot;home&quot; style={{color:&quot;white&quot;,textDecoration:&quot;none&quot;}}&gt;Conitnue&lt;/Link&gt;&lt;/button&gt;
              
            &lt;/div&gt;
            &lt;/div&gt;
     
    )
  }
  </code></pre>