import { Skeleton } from '@/components/ui/skeleton' import { cn } from '@/lib/utils' import { TRelayInfo } from '@/types' import { HTMLProps } from 'react' import { useTranslation } from 'react-i18next' import RelayIcon from '../RelayIcon' import SaveRelayDropdownMenu from '../SaveRelayDropdownMenu' import { SimpleUserAvatar } from '../UserAvatar' export default function RelaySimpleInfo({ relayInfo, users, className, ...props }: HTMLProps & { relayInfo?: TRelayInfo users?: string[] }) { const { t } = useTranslation() return (
{relayInfo?.name || relayInfo?.shortUrl}
{relayInfo?.name && (
{relayInfo?.shortUrl}
)}
{relayInfo && }
{!!relayInfo?.description &&
{relayInfo.description}
} {!!users?.length && (
{t('Favorited by')}
{users.slice(0, 10).map((user) => ( ))} {users.length > 10 && (
+{users.length - 10}
)}
)}
) } export function RelaySimpleInfoSkeleton({ className }: { className?: string }) { return (
) }