import { type FC } from 'react'; import { useRecoilValue } from 'recoil'; import { Menu, MenuButton, MenuItems } from '@headlessui/react'; import { BookmarkFilledIcon, BookmarkIcon } from '@radix-ui/react-icons'; import { BookmarkContext } from '~/Providers/BookmarkContext'; import { useGetConversationTags } from '~/data-provider'; import BookmarkNavItems from './BookmarkNavItems'; import { useLocalize } from '~/hooks'; import { cn } from '~/utils'; import store from '~/store'; type BookmarkNavProps = { tags: string[]; setTags: (tags: string[]) => void; isSmallScreen: boolean; }; const BookmarkNav: FC = ({ tags, setTags, isSmallScreen }: BookmarkNavProps) => { const localize = useLocalize(); const { data } = useGetConversationTags(); const conversation = useRecoilValue(store.conversationByIndex(0)); return ( {({ open }) => ( <>
{tags.length > 0 ? ( ) : ( )}
{tags.length > 0 ? tags.join(', ') : localize('com_ui_bookmarks')}
{data && conversation && ( tag.count > 0) }}> )} )}
); }; export default BookmarkNav;