« get me outta code hell

linkGroupDynamically.js « dependencies « content « src - hsmusic-wiki - HSMusic - static wiki software cataloguing collaborative creation
about summary refs log tree commit diff
path: root/src/content/dependencies/linkGroupDynamically.js
blob: 0b5bd85ce209669e8b5d946968344fd4bdfdc600 (plain)
1
2
3
4
5
6
7
8
9
10
11
export default {
  relations: (relation, group) => ({
    galleryLink: relation('linkGroupGallery', group),
    infoLink: relation('linkGroup', group),
  }),

  generate: (relations, {pagePath}) =>
    (pagePath[0] === 'groupGallery'
      ? relations.galleryLink
      : relations.infoLink),
};