diff options
author | (quasar) nebula <qznebula@protonmail.com> | 2023-07-26 11:23:49 -0300 |
---|---|---|
committer | (quasar) nebula <qznebula@protonmail.com> | 2023-07-26 11:23:49 -0300 |
commit | 2d5e22df4b418d96a88afb4589ac326fb77b6e7a (patch) | |
tree | 5dcd9ded2e4be484e80e8fc01b9f9617947b5cad /src/util | |
parent | bdb4276ffae1c978ec1d1a6e462faf8c117e20a9 (diff) |
content: generateWikiHomeAlbumsRow + homepage content
Diffstat (limited to 'src/util')
-rw-r--r-- | src/util/wiki-data.js | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/src/util/wiki-data.js b/src/util/wiki-data.js index a3133748..97a3f3e5 100644 --- a/src/util/wiki-data.js +++ b/src/util/wiki-data.js @@ -728,8 +728,8 @@ export function getArtistAvatar(artist, {to}) { // Big-ass homepage row functions -export function getNewAdditions(numAlbums, {wikiData}) { - const sortedAlbums = wikiData.albumData +export function getNewAdditions(numAlbums, {albumData}) { + const sortedAlbums = albumData .filter((album) => album.isListedOnHomepage) .sort((a, b) => { if (a.dateAddedToWiki > b.dateAddedToWiki) return -1; @@ -808,15 +808,14 @@ export function getNewAdditions(numAlbums, {wikiData}) { } } - return albums.map((album) => ({item: album})); + return albums; } -export function getNewReleases(numReleases, {wikiData}) { - return wikiData.albumData +export function getNewReleases(numReleases, {albumData}) { + return albumData .filter((album) => album.isListedOnHomepage) .reverse() - .slice(0, numReleases) - .map((album) => ({item: album})); + .slice(0, numReleases); } // Carousel layout and utilities |