I'm trying to pass on the value of a button to a function, however when the button is clicked the event is coming from the SVG and not from the button itself, when I click the button right on the edge where the SVG is not present the event fires normally. How can I make the SVG to be ignored in the onClick? I want the event to be from the button and not from the SVG. I am using Font Awesome and importing icons through the React library.
JSX:
<button className="btn-vote" value={site._id} name="1" onClick={handleVote}>{upSVG}
</button>
CSS:
.btn-vote {
font-size: 1.9vw;
background: none;
border: none;
height: 100%;
width: 50%;
}