I want to keep the main side nav as constant which should occupy 20% of the page. Rest of the 80% of the page should have 1st row as a header nav which should be constant. and on clicking the navlinks the Routes content in row 2 should change below the header nav.
Output:
____-----------------------
| | Header Nav |
|s |-----------------------
|i | Dynamic |
|d | Routes Content |
|e | |
|Na| |
|v | |
I tried like this:
App.js
<Router>
<main>
<MainNavigation>
<Routes>
<Route path="/sessions/upcoming" element={<Sessions />} />
<Route path="/sessions/past" element={<Sessions />} />
</Routes>
</MainNavigation>
</main>
</Router>
MainNavigation.js
const MainNavigation = (props) => {
return (
<div>
<SideNav /> `column 1 side navigation which occupies 20% of the page`
<HeaderNav /> `column 2 row 1, 80% of the pages gets dispayed with main navigation bar`
{props.childern} `column 2 row 2, displays 80% of the page`
</div>
);
};