diff --git a/frontend/web/src/components/CreateCollectionDrawer.tsx b/frontend/web/src/components/CreateCollectionDrawer.tsx index 15fefbb..2cd71f9 100644 --- a/frontend/web/src/components/CreateCollectionDrawer.tsx +++ b/frontend/web/src/components/CreateCollectionDrawer.tsx @@ -36,7 +36,15 @@ const CreateCollectionDrawer: React.FC = (props: Props) => { const requestState = useLoading(false); const isCreating = isUndefined(collectionId); const unselectedShortcuts = shortcutList - .filter((shortcut) => (state.collectionCreate.visibility === Visibility.PUBLIC ? shortcut.visibility === "PUBLIC" : true)) + .filter((shortcut) => { + if (state.collectionCreate.visibility === Visibility.PUBLIC) { + return shortcut.visibility === "PUBLIC"; + } else if (state.collectionCreate.visibility === Visibility.WORKSPACE) { + return shortcut.visibility === "PUBLIC" || shortcut.visibility === "WORKSPACE"; + } else { + return true; + } + }) .filter((shortcut) => !selectedShortcuts.find((selectedShortcut) => selectedShortcut.id === shortcut.id)); useEffect(() => { @@ -191,6 +199,7 @@ const CreateCollectionDrawer: React.FC = (props: Props) => {
+