// components.js
const Cards = {
TrackCard: (trackList) => {
const items = trackList.map(track => `
${track.name}
2 credits
`).join('');
return `
`;
},
PlaylistCard: (playlist) => `
${playlist.name}
${playlist.tracks} tracks
`,
ArtistCard: (artist) => `
${artist.name}
RELATED ARTISTS
`,
AlbumCard: (album) => `
${album.title}
${album.year || ''}
`
};