Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
cancelNotif() {
PushNotification.cancelLocalNotifications({id: ''+this.lastId});
}
const cancelNotification = id => PushNotification.cancelLocalNotifications({id })
export function clearNotifications(alarm) {
if (Platform.OS === 'ios') {
NotificationsIOS.cancelLocalNotification(alarm.uuid.toString());
} else if (Platform.OS === 'android') {
PushNotification.cancelLocalNotifications({ alarmUUID: alarm.uuid });
PushNotification.clearAllNotifications();
}
return (Object.assign({}, alarm, { notifications: [] }));
}