From 571f362d14d9a9a218e1dd3f154d4267e563669d Mon Sep 17 00:00:00 2001 From: Cory Dransfeldt Date: Fri, 2 Aug 2024 16:57:57 -0700 Subject: [PATCH] fix: sort artist level concerts --- package-lock.json | 4 ++-- package.json | 2 +- src/data/artists.js | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/package-lock.json b/package-lock.json index 767b1ad2..446fcd3b 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "coryd.dev", - "version": "21.2.0", + "version": "21.2.1", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "coryd.dev", - "version": "21.2.0", + "version": "21.2.1", "license": "MIT", "dependencies": { "@cdransf/api-text": "^1.4.0", diff --git a/package.json b/package.json index 1cd228fd..47db660b 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "coryd.dev", - "version": "21.2.0", + "version": "21.2.1", "description": "The source for my personal site. Built using 11ty (and other tools).", "type": "module", "scripts": { diff --git a/src/data/artists.js b/src/data/artists.js index 6cc56e94..0eab82b3 100644 --- a/src/data/artists.js +++ b/src/data/artists.js @@ -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 })) }