I'm looking for something that display some links (login & register) if (!userConnected) but if(userConnected) I want to display another informations than login & register.
I will display the elements by changing the states of userConnected bymyself so it doesn't have to be automatic, just functionnal if I put false to userConnected. Thanks!
I'm using React and react-router-dom in 5.2.0
<Route exact path="/"> {userConnected ? <Home/> : <Register>} </Route>
I've tried this but this is with new pages and me I want to be in the same page. So I thought to do the same home page twice and if the user is connected it will display the home page with her profile pic and if he's not login it will still display the home page but without profile pic and with the login and register links.