fix: sort artist level concerts

This commit is contained in:
Cory Dransfeldt 2024-08-02 16:57:57 -07:00
parent 70c8138064
commit 571f362d14
No known key found for this signature in database
3 changed files with 4 additions and 4 deletions

View file

@ -66,7 +66,7 @@ const processArtists = (artists) => {
totalPlays: album['total_plays'],
art: album.art ? `/${album['art']}` : ''
})).sort((a, b) => a['release_year'] - b['release_year']),
concerts: artist['concerts']?.[0]?.id ? artist['concerts'] : null
concerts: artist['concerts']?.[0]?.id ? artist['concerts'].sort((a, b) => new Date(b['date']) - new Date(a['date'])) : null
}))
}