git ssb

2+

mixmix / ticktack



Tree: 314000baff3b2045fe13f8edf6519b9bdd1779d5

Files: 314000baff3b2045fe13f8edf6519b9bdd1779d5 / app / page / private.js

791 bytesRaw
1const nest = require('depnest')
2const { h } = require('mutant')
3
4const pull = require('pull-stream')
5const dummyThread = require('../../test/fixtures/thread')
6
7exports.gives = nest('app.page.private')
8
9exports.needs = nest({
10 'app.sync.goTo': 'first',
11 'app.html.thread': 'first'
12})
13
14exports.create = (api) => {
15 return nest('app.page.private', private)
16
17 function private (location) {
18 // location here can expected to be an ssb-message
19 const { goTo } = api.app.sync
20
21 // TODO (mix) : swap for actual source, derived from location
22 const source = pull.values(dummyThread)
23 const thread = api.app.html.thread(source)
24
25 return h('div', [
26 h('h1', 'Private message'),
27 h('div', { 'ev-click': () => goTo({ page: 'home' }) }, 'Home'),
28 thread
29 ])
30 }
31}
32

Built with git-ssb-web