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

84
Vistas
have issue with token in react

my problem is that I get the token from the backend and I set it to local storage but when the user logs into the account data won't show to the user. but when the user refreshes the page, data would show to the user. what do you think is the problem? thank you for your time!

    const dashboardHeader = async () => {
    await axios.get('adminPanel/dashboard', {
        params: {
            fromDate: 'notSet',
            toDate: 'notSet'
        }
    })
    .then(res => {
        setHeaderData(res?.data?.result?.header)
        setLoading(false)
    })
    .catch(err => {
        console.log(err)
    })
}

this is one of my api examples

about 4 years ago · Juan Pablo Isaza
1 Respuestas
Responde la pregunta

0

the page has to refresh after the token is set.

about 4 years ago · Juan Pablo Isaza Denunciar
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