« get me outta code hell

hsmusic-wiki - HSMusic - static wiki software cataloguing collaborative creation
about summary refs log tree commit diff
path: root/src/content/contracts
diff options
context:
space:
mode:
Diffstat (limited to 'src/content/contracts')
-rw-r--r--src/content/contracts/adjacentAlbumsInGroup.js17
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};
-  },
-};