Issues_Aug_2W #371

Merged
pramod.mahajan merged 29 commits from Issues_Aug_2W into main 2025-09-05 05:45:32 +00:00
Showing only changes of commit cabb1b01c9 - Show all commits

View File

@ -7,19 +7,16 @@ import { setProjectId } from "../../slices/localVariablesSlice";
import { useSelectedProject } from "../../slices/apiDataManager";
const TaskPlannng = () => {
const selectedProject = useSelectedProject();
const dispatch = useDispatch();
const { projectNames, loading: projectLoading } = useProjectName();
const selectedProject = useSelectedProject();
const dispatch = useDispatch();
const { projectNames = [], loading: projectLoading } = useProjectName();
const initialized = useRef(false);
useEffect(() => {
if (!selectedProject) {
dispatch(setProjectId(projectNames[0].id));
}
}, [projectNames, selectedProject?.id, dispatch]);
useEffect(() => {
if (!initialized.current && projectNames.length > 0 && !selectedProject?.id) {
debugger
dispatch(setProjectId(projectNames[0].id));
initialized.current = true;
}
}, [projectNames, selectedProject, dispatch]);
return (
<div className="container-fluid">