import { NavLink } from 'react-router-dom'; import { twMerge } from 'tailwind-merge'; import { Image } from '@shared/image'; import { DEFAULT_AVATAR } from '@stores/constants'; import { useProfile } from '@utils/hooks/useProfile'; import { displayNpub } from '@utils/shortenKey'; import { Chats } from '@utils/types'; export function ChatsListItem({ data }: { data: Chats }) { const { status, user } = useProfile(data.sender_pubkey); if (status === 'loading') { return (