React.js make a phone call with a tag is not working

6.5k views Asked by At
   <NavLink exact to="/" className="nav-logo">
        <div className="nav-linker">
          <FaPhoneAlt size="19" className="nav-linker " />
          <a href="tel://+6199942413">call us!</a>
        </div>
        <div className="nav-linker">
          <FaMapMarkerAlt size="19" className="nav-linker " />
          <a href="https://goo.gl/maps/rc55DywgCJo26W28A">
            60 Bellevue Ave Gaythorne QLD 4115
          </a>
        </div>

i've simply tried a tag it is supposed to make a phone call when it's pressed does anyone know why it is not working ?

1

There are 1 answers

0
Ry_ On

<a href="tel:+6199942413">call us!</a> should work. Don't need the //.

Can also put <FaPhoneAlt size="19" className="nav-linker " /> inside the <a> to make:

<a href="tel:+6199942413">
 <FaPhoneAlt size="19" className="nav-linker"/>
</a>

if you ever want to remove the text.