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.