Compare commits
2 Commits
777b8d8d0b
...
d82a788350
| Author | SHA1 | Date | |
|---|---|---|---|
| d82a788350 | |||
| 4f67d58923 |
@ -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();
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user