Files: 1071420830e9c0d65973ba8c83523dba1402a931 / app / page / userShow.js
894 bytesRaw
1 | const nest = require('depnest') |
2 | const { h } = require('mutant') |
3 | |
4 | exports.gives = nest('app.page.userShow') |
5 | |
6 | exports.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 | |
14 | exports.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