From e47626f08436816cd855148aa8f663888923a919 Mon Sep 17 00:00:00 2001 From: "(quasar) nebula" Date: Fri, 31 May 2024 12:06:12 -0300 Subject: content: generateArtistGroupContributionsInfo: fix N/A sort --- src/content/dependencies/generateArtistGroupContributionsInfo.js | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/content/dependencies/generateArtistGroupContributionsInfo.js b/src/content/dependencies/generateArtistGroupContributionsInfo.js index 1725d4b9..ef81739d 100644 --- a/src/content/dependencies/generateArtistGroupContributionsInfo.js +++ b/src/content/dependencies/generateArtistGroupContributionsInfo.js @@ -161,9 +161,15 @@ export default { slots.visible && 'visible', ]; + // TODO: It feels pretty awkward that this component is the only one that + // has enough knowledge to decide if the sort button is even applicable... + const switchingSortPossible = + !empty(relations.groupLinksSortedByCount) && + !empty(relations.groupLinksSortedByDuration); + return html.tags([ html.tag('dt', {class: topLevelClasses}, - (slots.showSortButton + (switchingSortPossible && slots.showSortButton ? language.$('artistPage.groupContributions.title.withSortButton', { title: slots.title, sort: -- cgit 1.3.0-6-gf8a5