git ssb

2+

mixmix / ticktack



Tree: 963223adf0b2978b4a3b94648b98620052008579

Files: 963223adf0b2978b4a3b94648b98620052008579 / app / page / private.js

814 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
23 const id = '%fXXZgQrwnj7F+Y19H0IXxNriuvPFoahvusih3UzpkfA=.sha256'
24 const thread = api.app.html.thread(id)
25
26 return h('div', [
27 h('h1', 'Private message'),
28 h('div', { 'ev-click': () => goTo({ page: 'home' }) }, 'Home'),
29 thread
30 ])
31 }
32}
33

Built with git-ssb-web