Fix #100 Completing On time task not moved to archive until refresh
This commit is contained in:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user