Compare commits
No commits in common. "d82a7883505e722017d7cceb20fbd4bcca6eb24b" and "777b8d8d0b442fd43bcf33e71cccc67c7c416a0f" have entirely different histories.
d82a788350
...
777b8d8d0b
@ -10,7 +10,7 @@ export const useTaskList = (projectId, dateFrom, toDate) => {
|
|||||||
|
|
||||||
const fetchList = async () => {
|
const fetchList = async () => {
|
||||||
const taskList_cached = getCachedData("taskList");
|
const taskList_cached = getCachedData("taskList");
|
||||||
// if (!taskList_cached || taskList_cached?.projectId !== projectId) {
|
if (!taskList_cached || taskList_cached?.projectId !== projectId) {
|
||||||
try {
|
try {
|
||||||
setLoading(true);
|
setLoading(true);
|
||||||
const resp = await TasksRepository.getTaskList(
|
const resp = await TasksRepository.getTaskList(
|
||||||
@ -26,13 +26,14 @@ export const useTaskList = (projectId, dateFrom, toDate) => {
|
|||||||
console.log(err);
|
console.log(err);
|
||||||
setError(err);
|
setError(err);
|
||||||
}
|
}
|
||||||
// } else {
|
} else {
|
||||||
// setTaskList(taskList_cached.data);
|
setTaskList(taskList_cached.data);
|
||||||
// }
|
}
|
||||||
};
|
};
|
||||||
|
console.log(TaskList)
|
||||||
useEffect( () =>
|
useEffect( () =>
|
||||||
{
|
{
|
||||||
|
console.log( projectId , " ", dateFrom, "" , toDate)
|
||||||
if (projectId && dateFrom && toDate) {
|
if (projectId && dateFrom && toDate) {
|
||||||
fetchList();
|
fetchList();
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user