git ssb

2+

mixmix / ticktack



Tree: f7dff5dea73ce76928756982a627d93d49cb1968

Files: f7dff5dea73ce76928756982a627d93d49cb1968 / app / html / nav.js

904 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 h('a', { href: '%YRhFXmsAwipgyiwuHSP+EBr9fGjSqrMpWXUxgWcHxkM=.sha256' }, 'href link')
23 ])
24 }
25}
26

Built with git-ssb-web