- Progress commit

Signed-off-by: Dave Richer <dave@imexsystems.ca>
This commit is contained in:
Dave Richer
2024-03-28 15:02:06 -04:00
parent cc7c98336f
commit 9f9fa3b952
3 changed files with 43 additions and 20 deletions

View File

@@ -52,6 +52,19 @@ export default function TaskListContainer({bodyshop, titleTranslation ,query, r
};
}, [refetch]);
useEffect(() => {
const handleTaskUpdated = (event) => {
refetch();
};
window.addEventListener('taskUpdated', handleTaskUpdated);
// Clean up the event listener when the component is unmounted.
return () => {
window.removeEventListener('taskUpdated', handleTaskUpdated);
};
}, [refetch]);
/**
* Toggle task completed mutation
*/