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

290
Views
Tengo que mostrar el nombre de usuario después de iniciar sesión en reaccionar a continuación es mi código

a continuación se muestra mi código para iniciar sesión con el servidor json como backend, ahora tengo que mostrar el nombre de usuario registrado después de iniciar sesión correctamente

 const Login = () => { const classes = useStyles(); const [username, setUsername] = useState(""); const [error, setError] = useState(""); let navigate = useNavigate(); const login = (e) => { e.preventDefault(); axios .post("http://localhost:5000/api/auth/login", { username, }) .then((response) => { console.log("response", response); localStorage.setItem( "login", JSON.stringify({ userLogin: true, token: response.data.access_token, }) ); setError(""); setUsername(""); // setLogoutUser(false); navigate("/"); }) .catch((error) => setError(error.response.data.message)); };
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!