pramod_Feature#51ProjectLisFilter #51
@ -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 };
|
||||
};
|
||||
|
Loading…
x
Reference in New Issue
Block a user