title: React scroll with redirect to other route path
body: <p>I have a problem with my page that I build. There is main route path like &quot;/&quot; where is all page but there is also route path &quot;/privacy&quot; where you can go by clicking button &quot;Privacy policy&quot;. Main navigation and footer with navigation are displaying at &quot;/&quot; and &quot;/privacy&quot; also.</p>
  <p>It looks like this:</p>
  <pre><code>        &lt;Route exact path=&quot;/&quot;&gt;
              &lt;Header /&gt;
              &lt;Main /&gt;
              &lt;Footer /&gt;
          &lt;/Route&gt;
          &lt;Route path=&quot;/privacy&quot;&gt;
              &lt;Header /&gt;
              &lt;Privacy /&gt;
              &lt;Footer /&gt;
          &lt;/Route&gt;
  </code></pre>
  <p>The Main component looks like this</p>
  <pre><code>const Main = () =&gt; {
  
  
  return (
      &lt;&gt;
          &lt;Hello /&gt;
          &lt;Services /&gt;
          &lt;Projects /&gt;
          &lt;About /&gt;
          &lt;Contact /&gt;
      &lt;/&gt;
  )}
  </code></pre>
  <p>All buttons in nav are react-scroll links.</p>
  <pre><code>         &lt;ul&gt;
              &lt;li&gt;&lt;Link to=&quot;header&quot; smooth=&quot;true&quot; duration={1000}&gt;Main&lt;/Link&gt;&lt;/li&gt;
              &lt;li&gt;&lt;Link to=&quot;services&quot; smooth=&quot;true&quot; duration={1000}&gt;Services&lt;/Link&gt;&lt;/li&gt;
              &lt;li&gt;&lt;Link to=&quot;webdev&quot; smooth=&quot;true&quot; duration={1000}&gt;Portfolio&lt;/Link&gt;&lt;/li&gt;
              &lt;li&gt;&lt;Link to=&quot;about&quot; smooth=&quot;true&quot; duration={1000}&gt;About&lt;/Link&gt;&lt;/li&gt;
              &lt;li&gt;&lt;Link to=&quot;contact&quot; smooth=&quot;true&quot; duration={1000}&gt;Contact&lt;/Link&gt;&lt;/li&gt;
           &lt;/ul&gt;
  </code></pre>
  <p>How can I redirect user from &quot;/privacy&quot; and scroll to - for example - about component at my &quot;/&quot; route path when he clicks &quot;About&quot; button in nav?</p>
  <p>Example:</p>
  <p>User is at &quot;/privacy&quot; and he wants to read &quot;About&quot; section, so he clicks button &quot;About&quot; in nav and then website is redirecting to &quot;/&quot; and scrolling to &quot;About&quot; section.</p>