in sample/src/screens/HomeScreen.js [74:88]
async function deleteEventById(eventId) {
setRefreshing(true);
Analytics.record({
name: 'deleteEvent',
attributes: {
eventId: eventId,
userId: user.attributes.sub,
},
});
const details = {
id: eventId,
};
await API.graphql(graphqlOperation(deleteEvent, { input: details }));
getAllEvents();
}