const btn = (id) =>{
let play = [...todo].map(item =>{
if(item[0] == id){
setIcon(!icon)
}
return item
})
setTodo(play)
}
const btnIcon = icon ? 'icon-pause' : 'icon-play'
<button className={`icon ${btnIcon}`} onClick={() => btn(item[0])}></button>