From 4f67d58923edaa7c07b51b56c36efa47a00566d3 Mon Sep 17 00:00:00 2001 From: "ashutosh.nehete" Date: Mon, 14 Apr 2025 17:57:00 +0530 Subject: [PATCH] removed cache handling. --- src/hooks/useTasks.js | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/src/hooks/useTasks.js b/src/hooks/useTasks.js index 3c698952..3051acea 100644 --- a/src/hooks/useTasks.js +++ b/src/hooks/useTasks.js @@ -10,7 +10,7 @@ export const useTaskList = (projectId, dateFrom, toDate) => { const fetchList = async () => { const taskList_cached = getCachedData("taskList"); - if (!taskList_cached || taskList_cached?.projectId !== projectId) { + // if (!taskList_cached || taskList_cached?.projectId !== projectId) { try { setLoading(true); const resp = await TasksRepository.getTaskList( @@ -26,14 +26,13 @@ export const useTaskList = (projectId, dateFrom, toDate) => { console.log(err); setError(err); } - } else { - setTaskList(taskList_cached.data); - } + // } else { + // setTaskList(taskList_cached.data); + // } }; - console.log(TaskList) useEffect( () => { - console.log( projectId , " ", dateFrom, "" , toDate) + if (projectId && dateFrom && toDate) { fetchList(); }