Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
onPress: async () => {
try {
await Calendar.deleteCalendarAsync(calendar.id);
Alert.alert('Calendar deleted successfully');
this._findCalendars();
} catch (e) {
Alert.alert('Calendar not deleted successfully', e.message);
}
},
},