• + 0 comments

    import React, { useState } from "react";

    const FeedbackSystem = () => {

    const [list, setList] = useState([{ label:"Readablity", up:0, down:0 }, { label:"Performance", up:0, down:0 }, { label:"Security", up:0, down:0 }, { label:"Documentation", up:0, down:0 }, { label:"Testing", up:0, down:0 } ]);

    const handleUpvote = (index) => { const data = [...list] data[index].up+=1 setList(data) };

    const handleDownvote = (index) => { const data = [...list] data[index].down+=1 setList(data) };

    return ( {list.map((lists,index) => (

    {lists.label}

    upvote-btn-Extra close brace or missing open brace{lists.down}} onClick={() => handleDownvote(index)} > 👎 Downvote upvote-count-${lists.up}}> Upvotes: {lists.up}

    downvote-count-${lists.down}}> Downvotes: {lists.down}

    ))} ); };

    export default FeedbackSystem;

    why the test cases are failing