import { Text, Avatar, useTheme } from 'native-base'; import { MedalStar } from 'iconsax-react-native'; import { View } from 'react-native'; import { getInitials } from '../UserAvatar'; type PodiumCardProps = { offset: number; medalColor: string; userAvatarUrl?: string; // pseudo and lvl are optional because only when // we don't have the data for the 3rd place userPseudo?: string; userLvl?: number; }; export const PodiumCard = ({ offset, medalColor, userAvatarUrl, userPseudo, userLvl, }: PodiumCardProps) => { const { colors } = useTheme(); return ( {userPseudo ? getInitials(userPseudo) : '---'} {userPseudo ?? '---'} {userLvl ?? '-'} ); };