//Delete contacts
const deleteContctOf = (person) => {
console.log(person)
console.log('delete contact ' + person.id + ' ????')
if (window.confirm("Do you really want to delete this person")) {
contactService
.remove(person.id)
.setPersons(persons.map(person => person.id !=== id))
this solved the question
} else {
return
}
}