How can you pass the id on each clickso that it detects the specific post?

Iโ€™m trying to pass the id of the elements clicked in here, so when the button is clicked it should detect the id of the element clicked and then pass it to the onclick function:

  {finalResult.map((result) => {
    if(user.get("username") === result.author.username) {
        return <div class="central-meta item" key={result.id}>
        <div class="pit-post">
            <figure>
                <img src="images/resources/red-post2.jpg" alt="" />
                <i class="fa fa-video"></i>
            </figure>
            <div class="pit-post-deta">
                <h4><a href="social-post-detail.html" title="">{result.title}</a></h4>
                <ul class="post-up-time">
                    <li>
                        <div class="usr-fig">
                            <img src="images/resources/comet-1.jpg" alt="" />
                            <a href="#" title="">p/{user.get("username")}</a>
                        </div>
                    </li>
                    <li><i class="fa fa-clock-o"></i> Jan 12, 2020</li>
                
                        <div class="smiles-bunch">
                            <i class="em em---1"></i>
                            <i class="em em-smiley"></i>
                            <i class="em em-anguished"></i>
                            <i class="em em-laughing"></i>
                            <i class="em em-angry"></i>
                            <i class="em em-astonished"></i>
                            <i class="em em-blush"></i>
                            <i class="em em-disappointed"></i>
                            <i class="em em-worried"></i>
                            <i class="em em-kissing_heart"></i>
                            <i class="em em-rage"></i>
                            <i class="em em-stuck_out_tongue"></i>
                        </div>
                    </li>
                </ul>
            </div>
            <div class="number">
                <span class="plus" key={result.id} onClick={(id) => addVotes(id)}><i class="fa fa-angle-up"></i></span>                                                     
                <input type="text" value="0"/>
                <span class="minus" onClick={() => decreaseVotes()}><i class="fa fa-angle-down"></i></span>
            </div>
        </div>
    </div>
    } else {
        console.log("none")
    }
                    
})} 

Here is the onclick function, with this, the data which is the place where I store the database should detect the id, but this doesnโ€™t work properly:

const addVotes = (id) => {
    setClicked(true);
    data[id].set("votes", votes+1)



    data[id].save()
    return data;
}