Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
_updateCalendar = async (calendarId: string) => {
const newCalendar = {
title: 'cool updated calendar',
};
try {
await Calendar.updateCalendarAsync(calendarId, newCalendar);
Alert.alert('Calendar saved successfully');
this._findCalendars();
} catch (e) {
Alert.alert('Calendar not saved successfully', e.message);
}
}