X-Git-Url: https://git.arvados.org/arvados-workbench2.git/blobdiff_plain/6d1da474f9ae85108bbde00fe341cca65fd0ca06..227ffcbd2efe8cccd4a9025344b09632630cff14:/src/views-components/projects-tree-picker/projects-tree-picker.tsx

diff --git a/src/views-components/projects-tree-picker/projects-tree-picker.tsx b/src/views-components/projects-tree-picker/projects-tree-picker.tsx
index 6c66d1a9..10bb5eb8 100644
--- a/src/views-components/projects-tree-picker/projects-tree-picker.tsx
+++ b/src/views-components/projects-tree-picker/projects-tree-picker.tsx
@@ -7,9 +7,10 @@ import { values, memoize, pipe } from 'lodash/fp';
 import { HomeTreePicker } from '~/views-components/projects-tree-picker/home-tree-picker';
 import { SharedTreePicker } from '~/views-components/projects-tree-picker/shared-tree-picker';
 import { FavoritesTreePicker } from '~/views-components/projects-tree-picker/favorites-tree-picker';
-import { getProjectsTreePickerIds } from '~/store/tree-picker/tree-picker-actions';
+import { getProjectsTreePickerIds, SHARED_PROJECT_ID, FAVORITES_PROJECT_ID } from '~/store/tree-picker/tree-picker-actions';
 import { TreeItem } from '~/components/tree/tree';
 import { ProjectsTreePickerItem } from './generic-projects-tree-picker';
+import { PublicFavoritesTreePicker } from './public-favorites-tree-picker';
 
 export interface ProjectsTreePickerProps {
     pickerId: string;
@@ -21,13 +22,20 @@ export interface ProjectsTreePickerProps {
 }
 
 export const ProjectsTreePicker = ({ pickerId, ...props }: ProjectsTreePickerProps) => {
-    const { home, shared, favorites } = getProjectsTreePickerIds(pickerId);
+    const { home, shared, favorites, publicFavorites } = getProjectsTreePickerIds(pickerId);
     const relatedTreePickers = getRelatedTreePickers(pickerId);
+    const p = {
+        ...props,
+        relatedTreePickers,
+        disableActivation
+    };
     return <div>
-        <HomeTreePicker pickerId={home} {...props} {...{ relatedTreePickers }} />
-        <SharedTreePicker pickerId={shared} {...props} {...{ relatedTreePickers }} />
-        <FavoritesTreePicker pickerId={favorites} {...props} {...{ relatedTreePickers }} />
+        <HomeTreePicker pickerId={home} {...p} />
+        <SharedTreePicker pickerId={shared} {...p} />
+        <PublicFavoritesTreePicker pickerId={publicFavorites} {...p} />
+        <FavoritesTreePicker pickerId={favorites} {...p} />  
     </div>;
 };
 
 const getRelatedTreePickers = memoize(pipe(getProjectsTreePickerIds, values));
+const disableActivation = [SHARED_PROJECT_ID, FAVORITES_PROJECT_ID];
