git ssb

2+

mixmix / ticktack



Tree: e5b730f23ccfc66e564bdd503f597a01ed9ed0d1

Files: e5b730f23ccfc66e564bdd503f597a01ed9ed0d1 / app / html / nav.js

811 bytesRaw
1const nest = require('depnest')
2const { h } = require('mutant')
3
4exports.gives = nest('app.html.nav')
5
6exports.needs = nest({
7 'history.sync.push': 'first',
8 'history.sync.back': 'first'
9})
10
11exports.create = (api) => {
12 return nest('app.html.nav', nav)
13
14 function nav (id) {
15 const { push, back } = api.history.sync
16 return h('Nav', [
17 h('div.back', { 'ev-click': back }, '←'),
18 h('div', { 'ev-click': () => push({page: 'home'}) }, 'Home'),
19 // h('div', { 'ev-click': () => push({type: 'group', key: '%sadlkjas;lkdjas'}) }, 'Group'),
20 h('div', { 'ev-click': () => push({key: '%fXXZgQrwnj7F+Y19H0IXxNriuvPFoahvusih3UzpkfA=.sha256'}) }, 'Thread A'),
21 h('div', { 'ev-click': () => push({key: '%3cWZHeN6k03XpvDBxrxP5bGLsNByFLTvr/rKYFV4f+c=.sha256'}) }, 'Thread B')
22 ])
23 }
24}
25

Built with git-ssb-web