git ssb

1+

dinoworm ๐Ÿ› / catstack



Tree: 49c6e5459b68f2a30bcecf7727b8c9a99cfe4e79

Files: 49c6e5459b68f2a30bcecf7727b8c9a99cfe4e79 / example / app / modules / layout.js

466 bytesRaw
1module.exports = {
2 needs: { inu: { html: 'first' } },
3 create: (api) => (model, dispatch) => {
4 console.log('model', model)
5 const html = api.inu.html
6 return (view) => html`
7 <div>
8 <nav>
9 <a href='/'>home</a>
10 <a href=${`/cat/${randomId()}`}>a new cat!</a>
11 <a href='/nope'>nope</a>
12 </nav>
13 ${view}
14 </div>
15 `
16 }
17}
18
19function randomId () {
20 return Math.random().toString(8).substring(2)
21}
22

Built with git-ssb-web