I am getting response(image with link) from Api(via axios),and i want if "imagelink" is not empty only then "Link" tag should work, in other words "imagelink" is optional field,Here is my code,In other words i just want if "image" have "link"(coming from db via api) only then "link" href should work
{this.state.books.map((post, index) => {
return (
<Link href={post.link}>
<img src={post.image} />
</Link>
)
})}