import { User } from "lucide-react-native"; import React from "react"; import { View, Text, Image, TouchableOpacity } from "react-native"; import { useTranslation } from "react-i18next"; import { Contact } from "~/lib/stores"; interface ProfileCardProps { contact?: Contact; onPress?: () => void; } export default function ProfileCard({ contact, onPress }: ProfileCardProps) { const { t } = useTranslation(); if (!contact) { return ( {t("components.profilecard.emptyLabelContact")} ); } const displayName = contact.firstName || contact.name || t("components.profilecard.unknownContact"); const initials = displayName .split(" ") .map((n) => n[0]) .join("") .toUpperCase() .substring(0, 2); return ( {contact.imageAvailable && contact.image ? ( ) : ( {initials} )} {displayName} ); }