diff options
Diffstat (limited to 'src/content/contracts')
-rw-r--r-- | src/content/contracts/adjacentAlbumsInGroup.js | 17 |
1 files changed, 0 insertions, 17 deletions
diff --git a/src/content/contracts/adjacentAlbumsInGroup.js b/src/content/contracts/adjacentAlbumsInGroup.js deleted file mode 100644 index e982fa5b..00000000 --- a/src/content/contracts/adjacentAlbumsInGroup.js +++ /dev/null @@ -1,17 +0,0 @@ -export default { - hook(contract, [album, group]) { - contract.provide({ - group, - album, - albums: contract.selectProperty(group, 'albums'), - }); - }, - - compute({group, album, albums}) { - const datedAlbums = albums.filter(album => album.date); - const index = datedAlbums.indexOf(album); - const previousAlbum = (index > 0) && datedAlbums[index - 1]; - const nextAlbum = (index < datedAlbums.length - 1) && datedAlbums[index + 1]; - return {previousAlbum, nextAlbum}; - }, -}; |