« get me outta code hell

content: generateAlbumSidebar: fix album page box order - hsmusic-wiki - HSMusic - static wiki software cataloguing collaborative creation
about summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
author(quasar) nebula <qznebula@protonmail.com>2024-04-03 18:06:31 -0300
committer(quasar) nebula <qznebula@protonmail.com>2024-04-03 18:06:31 -0300
commitc2c5ecfac8610941937dcf21f4109984487c48dd (patch)
tree9b85886086b7b28ee24e1711443f5ae671007775 /src
parent02e7f77d851f0c4276e0170e8abcd43114c73b6b (diff)
content: generateAlbumSidebar: fix album page box order
Diffstat (limited to 'src')
-rw-r--r--src/content/dependencies/generateAlbumSidebar.js23
1 files changed, 12 insertions, 11 deletions
diff --git a/src/content/dependencies/generateAlbumSidebar.js b/src/content/dependencies/generateAlbumSidebar.js
index f014139c..355a9a9a 100644
--- a/src/content/dependencies/generateAlbumSidebar.js
+++ b/src/content/dependencies/generateAlbumSidebar.js
@@ -28,19 +28,20 @@ export default {
   generate: (data, relations) =>
     relations.sidebar.slots({
       boxes: [
+        data.isAlbumPage &&
+          relations.groupBoxes
+            .map(box => box.slot('mode', 'album')),
+
         relations.trackListBox,
 
-        (data.isAlbumPage
-          ? relations.groupBoxes
-              .map(box => box.slot('mode', 'album'))
-
-          : relations.conjoinedBox.slots({
-              attributes: {class: 'conjoined-group-sidebar-box'},
-              boxes:
-                relations.groupBoxes
-                  .map(box => box.slot('mode', 'track'))
-                  .map(box => box.content), /* TODO: Kludge. */
-            })),
+        !data.isAlbumPage &&
+          relations.conjoinedBox.slots({
+            attributes: {class: 'conjoined-group-sidebar-box'},
+            boxes:
+              relations.groupBoxes
+                .map(box => box.slot('mode', 'track'))
+                .map(box => box.content), /* TODO: Kludge. */
+          }),
       ],
     }),
 };