Files: 963223adf0b2978b4a3b94648b98620052008579 / app / page / private.js
814 bytesRaw
1 | const nest = require('depnest') |
2 | const { h } = require('mutant') |
3 | |
4 | const pull = require('pull-stream') |
5 | const dummyThread = require('../../test/fixtures/thread') |
6 | |
7 | exports.gives = nest('app.page.private') |
8 | |
9 | exports.needs = nest({ |
10 | 'app.sync.goTo': 'first', |
11 | 'app.html.thread': 'first' |
12 | }) |
13 | |
14 | exports.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