diff options
author | (quasar) nebula <qznebula@protonmail.com> | 2023-06-23 20:01:21 -0300 |
---|---|---|
committer | (quasar) nebula <qznebula@protonmail.com> | 2023-06-23 20:01:21 -0300 |
commit | c8332bb4e9b719eae0bc8f758ab1835ea1b4d0e8 (patch) | |
tree | 12476c2eee53d6ed95b9f63f16818e66ac13c7a1 /src/content/dependencies/generateAlbumGalleryPage.js | |
parent | 89e79008b02331b69660bb16b6ca737e37483e61 (diff) |
content: use stitchArrays in various places
Diffstat (limited to 'src/content/dependencies/generateAlbumGalleryPage.js')
-rw-r--r-- | src/content/dependencies/generateAlbumGalleryPage.js | 20 |
1 files changed, 12 insertions, 8 deletions
diff --git a/src/content/dependencies/generateAlbumGalleryPage.js b/src/content/dependencies/generateAlbumGalleryPage.js index 354c8401..71cd477b 100644 --- a/src/content/dependencies/generateAlbumGalleryPage.js +++ b/src/content/dependencies/generateAlbumGalleryPage.js @@ -1,3 +1,5 @@ +import {stitchArrays} from '../../util/sugar.js'; + export default { contentDependencies: [ 'generateAlbumGalleryInfoLine', @@ -89,14 +91,16 @@ export default { links: relations.links, names: data.names, images: - relations.images.map((image, i) => - image.slots({ - path: data.paths[i], - missingSourceContent: - language.$('misc.albumGalleryGrid.noCoverArt', { - name: data.names[i], - }), - })), + stitchArrays({ + image: relations.images, + path: data.paths, + name: data.names, + }).map(({image, path, name}) => + image.slots({ + path, + missingSourceContent: + language.$('misc.albumGalleryGrid.noCoverArt', {name}), + })), }), ], |