Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

123
Visualizações
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 à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda