From c722117108f0ca44a0603bb2ac4d9dfb452a7ff6 Mon Sep 17 00:00:00 2001 From: Pramod Mahajan Date: Tue, 17 Jun 2025 20:40:51 +0530 Subject: [PATCH] added params for refetch data --- src/hooks/useTasks.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/hooks/useTasks.js b/src/hooks/useTasks.js index 286efc3a..3b5fc56f 100644 --- a/src/hooks/useTasks.js +++ b/src/hooks/useTasks.js @@ -9,7 +9,7 @@ export const useTaskList = (projectId, dateFrom, toDate) => { const [loading, setLoading] = useState(false); const [error, setError] = useState(null); - const fetchList = async () => { + const fetchList = async (projectId, dateFrom, toDate) => { const taskList_cached = getCachedData("taskList"); // if (!taskList_cached || taskList_cached?.projectId !== projectId) { try { @@ -34,7 +34,7 @@ export const useTaskList = (projectId, dateFrom, toDate) => { { if (projectId && dateFrom && toDate) { - fetchList(); + fetchList(projectId, dateFrom, toDate); } }, [projectId, dateFrom, toDate]);