title: Redirecting with clicked link, React, RRD6
body: <p>sorry about title name, i cant name my problem, but basically: My navbar dropdown menu looks like this:</p>
  <pre><code>   Home    Dropdown    Contact
             Sign In
             Register
  </code></pre>
  <p>Problem is, when somebody <strong>clicks on SignIn and then clicks on Register</strong> (and conversely), the url will look like this: <code>http://localhost:3000/signupform/signin</code> so browser will tell that this page does not exist.</p>
  <p>But it <em>should</em> look like that: <code>http://localhost:3000/signupform</code></p>
  <p>Thanks everybody so much.</p>
  <p>Navbar code (without imports):</p>
  <pre><code>const Navbar = () =&gt; {
    const [isMenu, setisMenu] = useState(false);
      const [isResponsiveclose, setResponsiveclose] = useState(false);
      const toggleClass = () =&gt; {
        setisMenu(isMenu === false ? true : false);
        setResponsiveclose(isResponsiveclose === false ? true : false);
    };
  
      let boxClass = [&quot;main-menu menu-right menuq1&quot;];
      if(isMenu) {
          boxClass.push('menuq2');
      }else{
          boxClass.push('');
      }
  
      const [isMenuSubMenu, setMenuSubMenu] = useState(false);
        
      const toggleSubmenu = () =&gt; {
        setMenuSubMenu(isMenuSubMenu === false ? true : false);
      };
      
      let boxClassSubMenu = [&quot;sub__menus&quot;];
      if(isMenuSubMenu) {
          boxClassSubMenu.push('sub__menus__Active');
      }else {
          boxClassSubMenu.push('');
      }
  
  return (
     &lt;header&gt;
       &lt;nav&gt;
  &lt;div className=&quot;container&quot;&gt;
              &lt;div className=&quot;row&quot;&gt;
  
                  &lt;div className=&quot;header__middle__logo&quot;&gt;
                      &lt;Link to exact activeClassName='is-active' to=&quot;/&quot;&gt;
                          &lt;FontAwesomeIcon icon={faMagnifyingGlass} size=&quot;4x&quot; color=&quot;white&quot; alt=&quot;logo&quot; /&gt; 
                      &lt;/Link&gt;
                  &lt;/div&gt;
  
                  &lt;div className=&quot;header__middle__menus&quot;&gt;
                      &lt;nav className=&quot;main-nav &quot; &gt;
  
                      {/* Responsive Menu Button */}
                      {isResponsiveclose === true ? &lt;&gt; 
                          &lt;span className=&quot;menubar__button&quot; style={{ display: 'none' }} onClick={toggleClass} &gt; &lt;FiXCircle /&gt;   &lt;/span&gt;
                      &lt;/&gt; : &lt;&gt; 
                          &lt;span className=&quot;menubar__button&quot; style={{ display: 'none' }} onClick={toggleClass} &gt; &lt;FiAlignRight /&gt;   &lt;/span&gt;
                      &lt;/&gt;}
  
  
                      &lt;ul className={boxClass.join(' ')}&gt;
                      &lt;li  className=&quot;menu-item&quot; &gt;
                          &lt;Link to exact activeClassName='is-active' onClick={toggleClass} to={`/`}&gt; Home &lt;/Link&gt; 
                      &lt;/li&gt;
                      &lt;li className=&quot;menu-item &quot; &gt;&lt;Link  onClick={toggleClass} activeClassName='is-active' to={`/contact`}&gt;  &lt;/Link&gt; &lt;/li&gt;
                      &lt;li onClick={toggleSubmenu} className=&quot;menu-item sub__menus__arrows&quot; &gt; &lt;Link to=&quot;#&quot;&gt; Sign &lt;FiChevronDown /&gt; &lt;/Link&gt;
                          &lt;ul className={boxClassSubMenu.join(' ')} &gt; 
                              &lt;li&gt; &lt;Link onClick={toggleClass} activeClassName='is-active'  to={`signin`}&gt; Přihlásit se &lt;/Link&gt; &lt;/li&gt;
                              &lt;li&gt;&lt;Link onClick={toggleClass} activeClassName='is-active' to={`signupform`}&gt; Registrovat se &lt;/Link&gt; &lt;/li&gt;
                          &lt;/ul&gt;
                      &lt;/li&gt;
                      &lt;li className=&quot;menu-item &quot; &gt;&lt;Link onClick={toggleClass} activeClassName='is-active' to={`/Contact`}&gt; Contact &lt;/Link&gt; &lt;/li&gt;
  
                      &lt;/ul&gt;
                      &lt;/nav&gt;     
                  &lt;/div&gt;   
                &lt;/div&gt;
                &lt;/div&gt;
            &lt;/nav&gt;
         &lt;/header&gt;
  </code></pre>