import * as Popover from '@radix-ui/react-popover'; import { Editor } from '@tiptap/react'; import { nip19 } from 'nostr-tools'; import { MentionPopupItem } from '@app/new/components'; import { useStorage } from '@libs/storage/provider'; import { MentionIcon } from '@shared/icons'; export function MentionPopup({ editor }: { editor: Editor }) { const { db } = useStorage(); const insertMention = (pubkey: string) => { editor.commands.insertContent(`nostr:${nip19.npubEncode(pubkey)}`); }; return (
{db.account.contacts.length > 0 ? ( db.account.contacts.map((item) => ( )) ) : (
Contact list is empty
)}
); }