export enum TreePickerId {
PROJECTS = 'Projects',
SHARED_WITH_ME = 'Shared with me',
- FAVORITES = 'Favorites'
+ FAVORITES = 'Favorites',
+ PUBLIC_FAVORITES = 'Public Favorites'
}
export const createTree = <T>(): Tree<T> => ({});
const addChild = (parentId: string, childId: string) => <T>(tree: Tree<T>): Tree<T> => {
+ if (childId === "") {
+ return tree;
+ }
const node = getNode(parentId)(tree);
if (node) {
const children = node.children.some(id => id === childId)