« get me outta code hell

content: generateWikiHomeAlbumsRow + homepage content - hsmusic-wiki - HSMusic - static wiki software cataloguing collaborative creation
about summary refs log tree commit diff
path: root/src/util
diff options
context:
space:
mode:
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
commit2d5e22df4b418d96a88afb4589ac326fb77b6e7a (patch)
tree5dcd9ded2e4be484e80e8fc01b9f9617947b5cad /src/util
parentbdb4276ffae1c978ec1d1a6e462faf8c117e20a9 (diff)
content: generateWikiHomeAlbumsRow + homepage content
Diffstat (limited to 'src/util')
-rw-r--r--src/util/wiki-data.js13
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