I have tried using navigate() to go to the profile page but when I reload my react app it's just a white screen but I have defined the path '/profile'?
function App() {
const navigate = useNavigate();
return (
<div className="App" style={{height: '100%', minHeight: '100vh', backgroundColor: '#FFFDC8'}}>
<h1>Auction App</h1>
<Button variant="contained">Auctions</Button>
<Button variant="contained">My Auctions</Button>
<Button variant="contained" onClick={() => navigate("/profile")}>Profile</Button>
<Router>
<Routes>
<Route path='/' element={<Auctions />} />
<Route path='/register' element={<Register />} />
<Route path='/login' element={<Login />} />
<Route path='/auctions' element={<Auctions />} />
<Route path='/auction/:auctionId' element={<AuctionItem />} />
<Route path='/my-auctions' element={<MyAuctions />} />
<Route path='/profile' element={<Profile />} />
</Routes>
</Router>
</div>
);
}
export default App;