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]);