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