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

222
Vistas
Correct React syntax for using dynamic href mailto: and tel: links

Im trying to figure out the correct syntax for using both dynamic mailto: link as well as a tel: link in a React project I'm working on. I believe I've got the 'mailto:' working, but am struggling with the complexity of the conditionals in the phone number element. The 'extension' does NOT need to be included in the phone call link. All of the {JSX} included is being carried over as props. Code is below:

`<p className="cxEmail"><a className="emailLink" href={`mailto:${EMAIL}`}>{EMAIL}</a></p>

 <p className="cxPhoneNumber">
          {AreaCode && LocalNumber ? `${AreaCode}-${LocalNumber} ${Extension `ext.${BranchPhoneExtension}` : ''}`
            : `${BranchPhoneAreaCode}-${BranchPhoneNumber} ${BranchPhoneExtension ? `ext.${BranchPhoneExtension}` : ''}`}
 </p>`

Ive been trying to get this right for hours, and have hit a wall with figuring out the correct syntax.

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