'use client'; import { mediaConfig } from '@/lib/config/mediaConfig'; import { CountryFlagFormatter } from '@/lib/formatters/CountryFlagFormatter'; import { routes } from '@/lib/routing/RouteConfig'; import { Card, Card as Surface } from '@/ui/Card'; import { Heading } from '@/ui/Heading'; import { Icon } from '@/ui/Icon'; import { Image } from '@/ui/Image'; import { Link } from '@/ui/Link'; import { Stack } from '@/ui/Stack'; import { Text } from '@/ui/Text'; import { Users } from 'lucide-react'; interface Friend { id: string; name: string; avatarUrl?: string; country: string; } interface FriendsPreviewProps { friends: Friend[]; } export function FriendsPreview({ friends }: FriendsPreviewProps) { return ( }> Friends ({friends.length}) {friends.slice(0, 8).map((friend) => ( {friend.name} {friend.name} {CountryFlagFormatter.fromCountryCode(friend.country).toString()} ))} {friends.length > 8 && ( +{friends.length - 8} more )} ); }