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

193
Vistas
Unable to make Ant button open an external link in a new tab in React and NextJS

I have an Ant button set up like this:

<Button
                              style={{ borderRadius: '0.5rem' }}
                              type="default"
                              target="_blank"
                              onClick={() => {
                                window.location.assign(
                                  value.upComing[0].jitsiUrl,
                                );
                              }}
                            >
                              Join your Jitsi appointment
                            </Button>

where value.upComing[0].jitsiUrl is a URL string. However, when I actually press on the button, it appends the URL to the end of the current path, like this:

enter image description here

Additionally, it does not open in a new tab. Thus, I would like to know how to make it so that when the button is pressed, the URL is successfully opened in a new tab. I have tried using the "href" attribute with the "target = '_blank' " attribute, and while this opens in a new tab, the URL still appends to the end of the current path. (And for some reason, the string is undefined when I try that).

(Note: the App uses React and NextJS)

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

0

It's been a few days since I solved this, so sorry for the late update. It turns out, I had to append my URL with "https://", as it wasn't saved like that in the database. After that, it worked.

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