diff options
Diffstat (limited to 'src/content/dependencies/generateArtistInfoPageOtherArtistLinks.js')
| -rw-r--r-- | src/content/dependencies/generateArtistInfoPageOtherArtistLinks.js | 28 |
1 files changed, 0 insertions, 28 deletions
diff --git a/src/content/dependencies/generateArtistInfoPageOtherArtistLinks.js b/src/content/dependencies/generateArtistInfoPageOtherArtistLinks.js deleted file mode 100644 index afb61c33..00000000 --- a/src/content/dependencies/generateArtistInfoPageOtherArtistLinks.js +++ /dev/null @@ -1,28 +0,0 @@ -import {unique} from '#sugar'; - -export default { - query(contribs) { - const associatedContributionsByOtherArtists = - contribs - .flatMap(ownContrib => - ownContrib.associatedContributions - .filter(associatedContrib => - associatedContrib.artist !== ownContrib.artist)); - - const otherArtists = - unique( - associatedContributionsByOtherArtists - .map(contrib => contrib.artist)); - - return {otherArtists}; - }, - - relations: (relation, query) => ({ - artistLinks: - query.otherArtists - .map(artist => relation('linkArtist', artist)), - }), - - generate: (relations) => - relations.artistLinks, -}; |