after refresh attednace page, now it able get employee default selectedproject. #63
Loading…
x
Reference in New Issue
Block a user
No description provided.
Delete Branch "pramod_Bug#178"
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:
On page refresh, selectedProject was coming as undefined, which caused setProjectId to not dispatch. As a result, employee data and other project-related data were not loading.
Fix:
Added one more condition in a useEffect that checks if selectedProject is undefined or has the default fallback value (1). If so, it automatically sets the first available project from the logged-in user's project list.
Now, on page refresh, selectedProject is correctly initialized and all dependent data loads as expected.