<a> tag's href showing different url on hover

In a React component I want to show a link. That link’s url comes from props. In a browser dev tool tag’s href shows correct url but on hover it shows something different. Actually it’s a combination of my project main url and the url I want to show. On click it tries to got to that combined url and shows error. I console logged and the url coming to the component via props is correct. Doex

enter image description here

Add Comment
1 Answer(s)

You should do assign your URL with http:// or https:// otherwise it will consider it as the local directory from your project.

Something like this:

<a href="http://mail.ru"></a> 
Add Comment

Your Answer

By posting your answer, you agree to the privacy policy and terms of service.