git ssb

2+

mixmix / ticktack



Tree: 62556065fec94029f943b386bebf11f80ac8d829

Files: 62556065fec94029f943b386bebf11f80ac8d829 / app / page / userShow.js

894 bytesRaw
1const nest = require('depnest')
2const { h } = require('mutant')
3
4exports.gives = nest('app.page.userShow')
5
6exports.needs = nest({
7 'app.html.link': 'first',
8 'app.html.nav': 'first',
9 'about.html.image': 'first',
10 'about.obs.name': 'first',
11 'keys.sync.id': 'first',
12})
13
14exports.create = (api) => {
15 return nest('app.page.userShow', userShow)
16
17 function userShow (location) {
18
19 const { feed } = location
20 const Link = api.app.html.link
21 const myId = api.keys.sync.id()
22
23 return h('Page -userShow', [
24 h('h1', api.about.obs.name(feed)),
25 api.app.html.nav(),
26 api.about.html.image(feed),
27 h('div', 'follow button'),
28 h('div', 'friends in common'),
29 feed !== myId
30 ? Link({ page: 'threadNew', feed }, 'New Thread')
31 : '',
32 h('div', 'conversations you\'ve had with dominic'),
33 h('div', 'groups dominic is in'),
34 ])
35 }
36}
37

Built with git-ssb-web