diff --git a/src/@/components/BookmarkForm.tsx b/src/@/components/BookmarkForm.tsx index 52057e0..05fc9bf 100644 --- a/src/@/components/BookmarkForm.tsx +++ b/src/@/components/BookmarkForm.tsx @@ -27,7 +27,7 @@ import { Toaster } from './ui/Toaster.tsx'; import { getCollections } from '../lib/actions/collections.ts'; import { getTags } from '../lib/actions/tags.ts'; import { X } from 'lucide-react'; -import { Popover, PopoverContent, PopoverTrigger } from './ui/Popover.tsx'; +import { Popover, PopoverTrigger } from './ui/Popover.tsx'; import { CaretSortIcon } from '@radix-ui/react-icons'; import { Command, @@ -233,7 +233,7 @@ const BookmarkForm = () => { - {!openOptions && openCollections ? ( + {openCollections ? (
{ )}
- ) : openOptions && openCollections ? ( - - - - No Collection found. - {Array.isArray(collections) && ( - - {isLoading ? ( - { - form.setValue('collection', { - name: 'Unorganized', - }); - setOpenCollections(false); - }} - > - Unorganized - - ) : ( - collections?.map( - (collection: { - name: string; - id: number; - ownerId: number; - }) => ( - { - form.setValue('collection', { - ownerId: collection.ownerId, - id: collection.id, - name: collection.name, - }); - setOpenCollections(false); - }} - > - {collection.name} - - ) - ) - )} - - )} - - ) : undefined}