title: How to separate header and footer of homepage from displaying in admin page in react
body: <pre class="lang-js prettyprint-override"><code>function App() {
    return (
      &lt;Router &gt;
        &lt;NavBar/&gt;
          &lt;Routes&gt;
            &lt;Route path=&quot;/&quot; element={&lt;HomePage /&gt;}/&gt;
            &lt;Route exact path=&quot;/about-us&quot; element={&lt;About /&gt;} /&gt;
            &lt;Route exact path=&quot;/admin&quot; element = {&lt;Admin/&gt;}/&gt;
          &lt;/Routes&gt;
        &lt;Footer/&gt;
      &lt;/Router&gt;
    );
  }
  
  export default App;
  </code></pre>
  <p>How can I separate header and footer of homepage from displaying in admin page in react?</p>