I am currently using expo to develop an app. I'm currently prompting the user to enter a time they want a notification to be sent to them. I take that time and save it in firestore. I'm currently able to access the time with
db.collection("users")
.doc(auth.currentUser.uid)
.get()
.then((doc) => {
return doc.data().time;
});
my issue is now using that data in expos notification function inside the trigger
Notifications.scheduleNotificationAsync({
content: {
title: "App",
body: "Daily Reminder",
},
trigger: {
hour: "",
minute: "",
},
});
Im trying to put the returned value inside the hour and minute from the db but it doesn't seem to be working. The .then() returns a promise and i'm not sure how to handle it. I tried changing the .then() to async and await but still having trouble.