I am trying to have this link open in a new tab so users dont have to leave my site but it is not working with _blank

TheChiefRocker picture TheChiefRocker · Aug 22, 2019 · Viewed 11.2k times · Source

The link opens but not in a new tab.I am trying to have this link open in a new tab so users don't have to leave my site. I am using target="_blank" but it is not working

<BottomNavigation className={classes.root}>
    <BottomNavigationAction
      label="Instagram"
      rel="noopener noreferrer"
      href="https://www.instagram.com/_vhub/"
      target="_blank"
      icon={
        <img
          src="https://res.cloudinary.com/dvqyek3sb/image/upload/v1566370518/instagram_hmfqj5.png"
          alt="Instagrm"
        />
      }
    />

Answer

N. Djokic picture N. Djokic · Aug 22, 2019

Try put your whole component inside anchor tags or Link component and set their properties:

rel="noopener noreferrer" href="https://www.instagram.com/_vhub/" target="_blank"