Resolve data loading issue in DailyTask by defaulting to first project #64
Loading…
x
Reference in New Issue
Block a user
No description provided.
Delete Branch "pramod_Bug#184"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Issue:
After a page refresh in DailyTask.jsx, selectedProject was coming as undefined.
Because of this, project-related data like daily tasks were not loading.
Fixed
I have added fallback logic in DailyTask.jsx to handle cases where selectedProject is undefined or 1 on page refresh.
Now it sets the first project by default if no project is selected and ensures the data loads correctly.
Wrapped inside a one-time useEffect using a local initialized flag to avoid repeated dispatch.
Now, on refresh, the project is selected automatically, and all task-related data loads correctly.