git ssb

2+

mixmix / ticktack



Tree: b9268a67c8b095ed9b76e5d1192a6a88bddb1573

Files: b9268a67c8b095ed9b76e5d1192a6a88bddb1573 / 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