« get me outta code hell

hsmusic-wiki - HSMusic - static wiki software cataloguing collaborative creation
about summary refs log tree commit diff
path: root/src/content/dependencies/generateTrackInfoPage.js
diff options
context:
space:
mode:
Diffstat (limited to 'src/content/dependencies/generateTrackInfoPage.js')
-rw-r--r--src/content/dependencies/generateTrackInfoPage.js18
1 files changed, 5 insertions, 13 deletions
diff --git a/src/content/dependencies/generateTrackInfoPage.js b/src/content/dependencies/generateTrackInfoPage.js
index f37758fb..bab9122f 100644
--- a/src/content/dependencies/generateTrackInfoPage.js
+++ b/src/content/dependencies/generateTrackInfoPage.js
@@ -10,6 +10,7 @@ export default {
     'generateContentHeading',
     'generateContributionList',
     'generatePageLayout',
+    'generateTrackArtistCommentarySection',
     'generateTrackCoverArtwork',
     'generateTrackInfoPageFeaturedByFlashesList',
     'generateTrackInfoPageOtherReleasesList',
@@ -116,9 +117,8 @@ export default {
         track.album,
         track.additionalFiles),
 
-    artistCommentaryEntries:
-      track.commentary
-        .map(entry => relation('generateCommentaryEntry', entry)),
+    artistCommentarySection:
+      relation('generateTrackArtistCommentarySection', track),
 
     creditSourceEntries:
       track.creditSources
@@ -191,7 +191,7 @@ export default {
                         language.$(capsule, 'link')),
                   })),
 
-              !html.isBlank(relations.artistCommentaryEntries) &&
+              !html.isBlank(relations.artistCommentarySection) &&
                 language.encapsulate(capsule, 'readCommentary', capsule =>
                   language.$(capsule, {
                     link:
@@ -364,15 +364,7 @@ export default {
             relations.additionalFilesList,
           ]),
 
-          html.tags([
-            relations.contentHeading.clone()
-              .slots({
-                attributes: {id: 'artist-commentary'},
-                title: language.$('misc.artistCommentary'),
-              }),
-
-            relations.artistCommentaryEntries,
-          ]),
+          relations.artistCommentarySection,
 
           html.tags([
             relations.contentHeading.clone()