Nós vamos agora fazer a para o “NotificationService.js” criar o nosso serviço de deletar o hábito, que é bem simples, a gente vai deletar pelo seu nome, que o nosso identificador. “Src → Services → NotificationService.js”
}).then((id) => {
console.log(id)
});
}
async function deleteNotification(habitInput) {
await Notifications.cancelScheduledNotificationAsync(habitInput).then(() => {
console.log("Exclusão feita!");
});
}
export default {
createNotification,
deleteNotification,
};