async function deleteLike({ id }) {
    const newLikesArray = likes.filter(like => like.id !== id);
    setLikes(newLikesArray);
    await API.graphql({ query: deleteLikeMutation, variables: { input: { id } }});
  }
// This function is sending a GraphQL mutation along with some variables to delete a like.
This function is sending a GraphQL mutation along with some variables to delete a like.
This function is sending a GraphQL mutation along with some variables to delete a like .
async function deleteLike({ id }) {
    const newLikesArray = likes.filter(like => like.id !== id);
    setLikes(newLikesArray);
    await API.graphql({ query: deleteLikeMutation, variables: { input: { id } }});
  }
async function deleteLike ( { id } ) { const newLikesArray = likes . filter ( like => like . id !== id ) ; setLikes ( newLikesArray ) ; await API . graphql ( { query : deleteLikeMutation , variables : { input : { id } } } ) ; }
This function is sending a GraphQL mutation along with some variables to delete a like.
This function is sending a GraphQL mutation along with some variables to delete a like .