« get me outta code hell

hsmusic-wiki - HSMusic - static wiki software cataloguing collaborative creation
about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--src/content/dependencies/linkFlashAct.js26
1 files changed, 17 insertions, 9 deletions
diff --git a/src/content/dependencies/linkFlashAct.js b/src/content/dependencies/linkFlashAct.js
index fbb819ed..82c23325 100644
--- a/src/content/dependencies/linkFlashAct.js
+++ b/src/content/dependencies/linkFlashAct.js
@@ -1,14 +1,22 @@
 export default {
-  contentDependencies: ['linkThing'],
-  extraDependencies: ['html'],
+  contentDependencies: ['generateUnsafeMunchy', 'linkThing'],
 
-  relations: (relation, flashAct) =>
-    ({link: relation('linkThing', 'localized.flashActGallery', flashAct)}),
+  relations: (relation, flashAct) => ({
+    unsafeMunchy:
+      relation('generateUnsafeMunchy'),
 
-  data: (flashAct) =>
-    ({name: flashAct.name}),
+    link:
+      relation('linkThing', 'localized.flashActGallery', flashAct),
+  }),
 
-  generate: (data, relations, {html}) =>
-    relations.link
-      .slot('content', new html.Tag(null, null, data.name)),
+  data: (flashAct) => ({
+    name: flashAct.name,
+  }),
+
+  generate: (data, relations) =>
+    relations.link.slots({
+      content:
+        relations.unsafeMunchy
+          .slot('contentSource', data.name),
+    }),
 };