I am learning React. I am working on the admin panel and I have to show my menu on only the inner page like dashboard, list, add, etc. As of now, I am getting the menu on all the pages. I mean I am on the login page and I am getting the menu. I don't want to show the menu on my login page.
Is there any way only to display the menu on a specific page?
I am using the below code in App.js
import React from "react";
import {BrowserRouter as Router, Route,Switch } from "react-router-dom";
import Header_top_menu from "./component/pages/Header-top-menu";
import Header_left_menu from "./component/pages/Header-left-menu";
import Login_emp from './component/pages/Login_emp';
import Employee_list from "./component/pages/Employee/Employee_list";
import '../node_modules/bootstrap/dist/css/bootstrap.min.css';
import NotFound from "./component/pages/404";
function App(){
return(
<Router>
<Header_top_menu /> {/*top menu*/}
<div className="bodyWrapper">
<div className="leftCol h-100 shadow-sm">
<Header_left_menu /> {/*left menu*/}
</div>
<div className="rightCol h-100">
<div className="bodyInnerWrap mt-5 pt-4 pt-4 pl-4 pr-4">
<Switch>
<Route exact path="/" component={Login_emp} />
<Route exact path="/employeelist" component={Employee_list} />
<Route component={NotFound} />
</Switch>
</div>
</div>
</div>
</Router>
)
}
export default App;
I added code here: