0

I seem to be having an issue where my site doesn't appear to be redirecting correctly to social sites example below

https://www.shillerslist.com/https://t.me/shillerslist

Here's my code:

        <Link
          class='social-icon-link telegram'
          to='/https://t.me/shillerslist'
          target='https://t.me/shillerslist'
          aria-label='Telegram'
        >
          <i class="fab fa-telegram-plane"></i>
        </Link>

It keeps putting my website in front of the url and I'm not sure how I can stop it?

  • Does this answer your question? [React-Router open Link in new tab](https://stackoverflow.com/questions/30202755/react-router-open-link-in-new-tab) – Osama Bin Saleem Jul 29 '21 at 13:13
  • Could it be the leading slash in the *to* attribute? I would try with `to="https://t.me/shillerslist" target="_blaknk"` instead – Patrick Janser Jul 29 '21 at 13:13

2 Answers2

0

Try this:

<Link
  className='social-icon-link telegram'
  to='https://t.me/shillerslist'
  target="_blank"
  aria-label='Telegram'
  rel="noopener noreferrer"
>
   <i className="fab fa-telegram-plane"></i>
</Link>

You can also use this one as well:

<a href={"https://t.me/shillerslist"} target="_blank"> 
  <i className="fab fa-telegram-plane"></i>
</a>

Also it seems your url: https://t.me/shillerslist is not working

Osama Bin Saleem
  • 779
  • 1
  • 12
  • 24
0

I've solved it, it required // at the start of the link to.

        <Link
          class='social-icon-link telegram'
          link to="//t.me/shillerslist"
          target='_blank'
          aria-label='Telegram'
        >
          <i class="fab fa-telegram-plane"></i>
        </Link>