import * as DropdownMenu from '@radix-ui/react-dropdown-menu'; import { writeText } from '@tauri-apps/plugin-clipboard-manager'; import { nip19 } from 'nostr-tools'; import { EventPointer } from 'nostr-tools/lib/types/nip19'; import { useState } from 'react'; import { Link } from 'react-router-dom'; import { HorizontalDotsIcon } from '@shared/icons'; import { WIDGET_KIND } from '@utils/constants'; import { useWidget } from '@utils/hooks/useWidget'; export function MoreActions({ id, pubkey }: { id: string; pubkey: string }) { const [open, setOpen] = useState(false); const { addWidget } = useWidget(); const copyID = async () => { await writeText(nip19.neventEncode({ id: id, author: pubkey } as EventPointer)); setOpen(false); }; const copyLink = async () => { await writeText( 'https://njump.me/' + nip19.neventEncode({ id: id, author: pubkey } as EventPointer) ); setOpen(false); }; return ( View profile ); }