I want to hide the <Header/> component when I am in the Login.
I've tried to follow Answer to this question but failed.
Below is my App.js code
function App() {
return <React.Fragment>
<header>
<Header/>
</header>
<main>
<Routes>
<Route path="/" element={<Login/>} exact/>
<Route path="/home" element={<Home/>} exact/>
<Route path="/add" element={<AddBook/>} exact/>
<Route path="/books" element={<Books/>} exact/>
<Route path="/about" element={<About/>} exact/>
<Route path="/login" element={<Login/>} exact/>
<Route path="/register" element={<Register/>} exact/>
<Route path="/books/:id" element={<BookDetail/>} exact/>
</Routes>
</main>
</React.Fragment>
}