import * as Popover from '@radix-ui/react-popover'; import { Editor } from '@tiptap/react'; import { nip19 } from 'nostr-tools'; import { useStorage } from '@libs/storage/provider'; import { MentionItem } from '@shared/composer'; 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.follows.map((item) => ( ))}
); }