import { useState } from 'react'; import { Button } from '@shared/button'; import { Image } from '@shared/image'; import { DEFAULT_AVATAR, FULL_RELAYS } from '@stores/constants'; import { useNostr } from '@utils/hooks/useNostr'; import { useProfile } from '@utils/hooks/useProfile'; import { displayNpub } from '@utils/shortenKey'; export function NoteReplyForm({ id, pubkey }: { id: string; pubkey: string }) { const { publish } = useNostr(); const { status, user } = useProfile(pubkey); const [value, setValue] = useState(''); const submit = () => { const tags = [['e', id, FULL_RELAYS[0], 'reply']]; // publish event publish({ content: value, kind: 1, tags }); // reset form setValue(''); }; return (
Loading...
Reply as
{user?.nip05 || user?.name || displayNpub(pubkey, 16)}