Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

122
Vistas
How to display something determined by if the user is connected or not to a website

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.

about 4 years ago · Juan Pablo Isaza
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda