Hello all, I would like to add my netlify link on my array and get it on the images, that way people can directly click on the image to go to the external website - I need help to know how to add a link through an array, thanks
#external link on array / props
19 messages · Page 1 of 1 (latest)
Please share the ProjectCard component
You want whan people clikc the image go to the link you're providing right?
Yes but in react we use something called Link and you should import it first
Like this
import {Link} from "react-router-dom"
And then wrap your image with the Link like this:
<Link to={yourlinkhere}>
<img ..../></Link>
oh, I thought link was for internal links only
like for the nav bar
thanks a lot, trying now
so the problem is that it gives me this link : http://localhost:3000/https://lea-giangrosso-counter.netlify.app/
instead of : https://lea-giangrosso-counter.netlify.app/
Im always using Link instead of a in react
I recommend you to read this to understand how to use it and to understand all thing about react router dom
thank you but this is for links included in the website, not for external ones
working with this :
No problem