0

I am using React. I have a component called profileTop. I am currently at url localhost:3000/profile/3935935721

const ProfileTop = ({profile: {status,company,location,website,social,user:{avatar, name}}}) => {
    return (
 <div class="icons my-1">
              {website && (<a href= "www.google.com" target="_self" rel="noopener noreferrer">
              <i class="fas fa-globe fa-2x"></i>
            </a>)}
)

When I click at that a tag the url becomes localhost:3000/profile/www.google.com instead of www.google.com. What is the error?

Nick
  • 3
  • 2

1 Answers1

0

You must add http:// or https://

<a href="https://google.com">

Check out this question.

eniel.rod
  • 510
  • 4
  • 9