Fix #100 Completing On time task not moved to archive until refresh

This commit is contained in:
Mo Tarbin 2025-02-08 02:10:30 -05:00
parent 06519a0e5c
commit 96c4d7e903

View file

@ -244,7 +244,10 @@ const MyChores = () => {
}
return chore
})
if (event === 'archive') {
if (
event === 'archive' ||
(event === 'completed' && updatedChore.frequencyType === 'once')
) {
newChores = newChores.filter(chore => chore.id !== updatedChore.id)
newFilteredChores = newFilteredChores.filter(
chore => chore.id !== updatedChore.id,