|
@@ -207,6 +207,12 @@ function useSelectedProjects() {
|
|
|
const {projects} = useProjects();
|
|
|
|
|
|
return useMemo(() => {
|
|
|
+ if (selection.projects.length === 0) {
|
|
|
+ return projects.filter(project => project.isMember);
|
|
|
+ }
|
|
|
+ if (selection.projects.includes(-1)) {
|
|
|
+ return projects;
|
|
|
+ }
|
|
|
return projects.filter(project => selection.projects.includes(Number(project.id)));
|
|
|
}, [selection.projects, projects]);
|
|
|
}
|