diff options
Diffstat (limited to 'src/content/dependencies/generateTrackInfoPageContent.js')
-rw-r--r-- | src/content/dependencies/generateTrackInfoPageContent.js | 26 |
1 files changed, 4 insertions, 22 deletions
diff --git a/src/content/dependencies/generateTrackInfoPageContent.js b/src/content/dependencies/generateTrackInfoPageContent.js index eea387bb..57bdc0c2 100644 --- a/src/content/dependencies/generateTrackInfoPageContent.js +++ b/src/content/dependencies/generateTrackInfoPageContent.js @@ -4,6 +4,7 @@ export default { contentDependencies: [ 'generateContentHeading', 'generateCoverArtwork', + 'generateTrackList', 'generateTrackListDividedByGroups', 'linkAlbum', 'linkContribution', @@ -94,11 +95,8 @@ export default { references.heading = relation('generateContentHeading'); - references.items = - track.referencedTracks.map(track => ({ - trackLink: relation('linkTrack', track), - contributionLinks: contributionLinksRelation(track.artistContribs), - })); + references.list = + relation('generateTrackList', track.referencedTracks); } // Section: Tracks that reference @@ -161,21 +159,6 @@ export default { contributionLinks.map(link => link.slots({showContribution, showIcons}))); - const formatTrackItem = ({trackLink, contributionLinks}) => - html.tag('li', - language.$('trackList.item.withArtists', { - track: trackLink, - by: - html.tag('span', {class: 'by'}, - language.$('trackList.item.withArtists.by', { - artists: - formatContributions(contributionLinks, { - showContribution: false, - showIcons: false, - }), - })), - })); - if (data.hasUniqueCoverArt) { content.cover = relations.cover .slots({ @@ -311,8 +294,7 @@ export default { }), }), - html.tag('ul', - sec.references.items.map(formatTrackItem)), + sec.references.list, ], sec.referencedBy && [ |