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 const NoteDefaultUser = ({ pubkey, time }: { pubkey: string; time: number }) => { const { user } = useProfile(pubkey); return (
{pubkey}
{user?.display_name || shortenKey(pubkey)}
{user?.nip05 || shortenKey(pubkey)} {dayjs().to(dayjs.unix(time))}
); };