import React, { memo } from 'react'; import { useTranslation } from 'react-i18next'; import { ExternalLink, Play, TrendingUp } from 'lucide-react'; import type { SubsonicSong } from '@/api/subsonicTypes'; import { formatTrackTime } from '@/utils/format/formatDuration'; interface TopSongsCardProps { artistName: string; artistId?: string; songs: SubsonicSong[]; currentTrackId: string; onNavigate: (path: string) => void; onPlay: (song: SubsonicSong) => void; } const TopSongsCard = memo(function TopSongsCard({ artistName, artistId, songs, currentTrackId, onNavigate, onPlay }: TopSongsCardProps) { const { t } = useTranslation(); const top = songs.slice(0, 8); if (top.length === 0) return null; return (