git ssb

10+

Matt McKegg / patchwork



Commit 1e37adb6639b35ce588fd25a2924a389b272b1f1

clean up some code in blog (standard js)

Matt McKegg committed on 4/13/2018, 4:10:30 AM
Parent: b13a4ef7ad49f0ccd4f289b5941f55999a4f0ffc

Files changed

plugs/message/html/render/blog.jschanged
plugs/message/html/render/blog.jsView
@@ -1,9 +1,8 @@
11 const nest = require('depnest')
22 const isBlog = require('scuttle-blog/isBlog')
3-const { h, Value, computed, when, resolve } = require('mutant')
3+const { h, when, resolve } = require('mutant')
44
5-
65 exports.gives = nest('message.html', {
76 canRender: true,
87 render: true
98 })
@@ -18,16 +17,13 @@
1817 'sbot.obs.connection': 'first'
1918 })
2019
2120 exports.create = function (api) {
22-
2321 return nest('message.html', {
2422 render: blogRenderer,
2523 canRender
2624 })
2725
28- return nest('message.html.render', blogRenderer)
29-
3026 function blogRenderer (msg, opts) {
3127 if (!canRender(msg)) return
3228
3329 var content = null
@@ -45,9 +41,9 @@
4541 color: api.about.obs.color,
4642 blobUrl: api.blob.sync.url
4743 })
4844 }
49-
45+
5046 const element = api.message.html.layout(msg, Object.assign({}, {
5147 content,
5248 layout: 'default'
5349 }, opts))
@@ -93,5 +89,5 @@
9389 }
9490
9591 function canRender (msg) {
9692 if (isBlog(msg)) return true
97-}
93+}

Built with git-ssb-web