web: reset snoozeUntil & disabled state on edit

This commit is contained in:
Abdullah Atta
2023-01-05 21:02:25 +05:00
committed by Abdullah Atta
parent 360b94353a
commit fbfcfe1bcb

View File

@@ -145,7 +145,6 @@ export default function AddReminderDialog(props: AddReminderDialogProps) {
setTime(dayjs(reminder.date).format("HH:mm"));
setTitle(reminder.title);
setDescription(reminder.description);
console.log(reminder);
}, [reminderId]);
const repeatsDaily =
@@ -200,7 +199,9 @@ export default function AddReminderDialog(props: AddReminderDialogProps) {
selectedDays,
date: dateTime.valueOf(),
title,
description
description,
disabled: false,
...(dateTime.isAfter(dayjs()) ? { snoozeUntil: 0 } : {})
});
refresh();
props.onClose(true);