import { Image } from '@lume/shared/image'; import { DEFAULT_AVATAR, IMGPROXY_URL } from '@lume/stores/constants'; import { useProfile } from '@lume/utils/hooks/useProfile'; import { shortenKey } from '@lume/utils/shortenKey'; import dayjs from 'dayjs'; import relativeTime from 'dayjs/plugin/relativeTime'; dayjs.extend(relativeTime); export default function NoteReplyUser({ pubkey, time }: { pubkey: string; time: number }) { const { user } = useProfile(pubkey); return (
{pubkey}
{user?.display_name || user?.name || shortenKey(pubkey)} ยท {dayjs().to(dayjs.unix(time), true)}
); }