I have a landing page that is made up of multiple routes as a single page application. But now I want to add in another route called /dashboard which shows live data from an API so when a user clicks on the button to the dashboard all they see is the contents of the dashboard and not the navbar and the footer above the dashboard.
function App() {
return (
<Router>
<Navbar />
<Switch>
<Route path="/" exact component={Home} />
<Route path="/process" exact component={Process} />
<Route path="/products" exact component={Products} />
<Route path="/team" exact component={Team} />
</Switch>
<Footer />
<Route exact path="/dashboard">
<Dashboard />
</Route>
</Router>
);
}
Image below is what I am talking about the Navbar and Footer still being visible when clicking on the Dashboard button. It is just displaying the word Dashboard for now. I want it so that only the Dashboard is visible when the user clicks on the Dashboard button.
