Files: 60479658b26b297158dd59938d021562a5b447ec / app / page / threadShow.js
557 bytesRaw
1 | const nest = require('depnest') |
2 | const { h } = require('mutant') |
3 | |
4 | exports.gives = nest('app.page.threadShow') |
5 | |
6 | exports.needs = nest({ |
7 | 'app.html.nav': 'first', |
8 | 'app.html.thread': 'first' |
9 | }) |
10 | |
11 | exports.create = (api) => { |
12 | return nest('app.page.threadShow', threadShow) |
13 | |
14 | function threadShow (location) { |
15 | // location here can expected to be an ssb-message |
16 | |
17 | const thread = api.app.html.thread(location.key) |
18 | |
19 | return h('Page -threadShow', [ |
20 | h('h1', 'Private message'), |
21 | api.app.html.nav(), |
22 | h('div.container', thread) |
23 | ]) |
24 | } |
25 | } |
26 |
Built with git-ssb-web