Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

223
Visualizações
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 à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda