pramod_Feature#51ProjectLisFilter #51

Merged
admin merged 4 commits from pramod_Feature#51ProjectLisFilter into Issues_April_4W 2025-04-25 11:00:45 +00:00
Showing only changes of commit e102abb117 - Show all commits

View File

@ -49,19 +49,19 @@ export const useProjects = () =>
fetchData();
}, []);
useEffect( () =>
{
if (projects )
{
if ( profile?.projects && profile?.projects?.length > 0 )
{
dispatch(setProjectId(profile?.projects[0]))
} else
{
dispatch(setProjectId(1))
}
}
}, [profile]);
// useEffect( () =>
// {
// if (projects )
// {
// if ( profile?.projects && profile?.projects?.length > 0 )
// {
// dispatch(setProjectId(profile?.projects[0]))
// } else
// {
// dispatch(setProjectId(1))
// }
// }
// }, [profile]);
return { projects, loading, error, refetch: fetchData };
};