0
<NavLink target="_blank" to={{ pathname: "mailto:test@gmail.com" }}>
   <h3>Say hi...</h3>
</NavLink>
<NavLink
          style={{ color: "inherit" }}
          to={{ pathname: "https://github.com/user" }}
          target="_blank"
        >
          <LinkedIn width={30} height={25} fill="currentColor" />
        </NavLink>

Here I am using NavLink to reach a external Link. But when I click on the link it redirects to http://localhost:3000/mailto:test@gmail.com. using a instead of NavLink is working fine.

Is there any way that it can work with NavLink.

Thanks in Advance

1 Answers1

-1

Try sth. like this

<NavLink as="a" target="_blank" href="mailto:test@gmail.com">
   <h3>Say hi...</h3>
</NavLink>
Markus
  • 1,909
  • 4
  • 26
  • 54