git ssb

2+

mixmix / ticktack



Tree: f736acde0d02447833cfd0c3a021d2d560e5c9a6

Files: f736acde0d02447833cfd0c3a021d2d560e5c9a6 / app / html / nav.js

788 bytesRaw
1const nest = require('depnest')
2const { h } = require('mutant')
3
4exports.gives = nest('app.html.nav')
5
6exports.needs = nest({
7 'app.html.link': 'first',
8 'history.sync.push': 'first',
9 'history.sync.back': 'first'
10})
11
12exports.create = (api) => {
13 return nest('app.html.nav', nav)
14
15 function nav (id) {
16 const { push, back } = api.history.sync
17
18 const goHome = () => push({page: 'home'})
19 // CHANGE THIS : zero history
20 const Link = api.app.html.link
21
22 return h('Nav', [
23 h('div.back', { 'ev-click': back }, '←'),
24 h('div', { 'ev-click': goHome }, 'Home'),
25 Link({ page: 'settings' }, 'Settings'),
26 Link({ page: 'userFind' }, 'Find a User'),
27 h('a', { href: '%YRhFXmsAwipgyiwuHSP+EBr9fGjSqrMpWXUxgWcHxkM=.sha256' }, 'A Thread')
28 ])
29 }
30}
31
32

Built with git-ssb-web