Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

202
Views
useNavigator & currentAuthenticatedUser [REACCIONAR, AMPLIFICAR]

Necesita activar useNavigator() si un usuario ha iniciado sesión, o mostrar un componente de interfaz de usuario importado si no lo está.

Configuré las rutas del navegador desde mi App.js:

La página de inicio se dirige a "/"

Otra página se representa en "/app".

Déjame saber si debo proporcionar más detalles. ¡Gracias por la ayuda!

 import React from "react" import '../App.css'; import {HeroLayout3} from "../ui-components" import { Auth, Hub } from 'aws-amplify'; import { useNavigate } from "react-router-dom"; export function Home() { let navigate = useNavigate() return ( Auth.currentAuthenticatedUser({ bypassCache: true }).then(() => navigate('/app')).catch(<HeroLayout3 width="100vw" height="79vh"/>) ); } export default Home;
about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!