I got a total of 3 conditions. When I add the class possible-links-cont-star-btn with the x.feature condition I want to remove the all other classes element have.
<Link
key={i}
onClick={() => setSelectedEvent(x)}
className="possible-links-cont-link"
>
<button
className={`
${(i === 0 || i === izmirEventItemData.length - 1) ? "possible-links-cont-empty-btn" : "possible-links-cont-btn"}
${isHovered ? "active" : ""}
${x.feature ? "possible-links-cont-star-btn" : ""}
`}
onMouseOver={() => {
setHoveredText(x);
setIsHovered(true);
}}
onMouseLeave={() => setIsHovered(false)}
></button>
</Link>
I tried to do that without conditional rendering but couldn't do it.