Files: 1a326ad6e229f48d252a5d8e4e8dd65a803f4d58 / app / page / blob.js
446 bytesRaw
1 | const nest = require('depnest') |
2 | const { h } = require('mutant') |
3 | |
4 | exports.gives = nest('app.page.blob') |
5 | |
6 | exports.needs = nest('blob.sync.url', 'first') |
7 | |
8 | exports.create = (api) => { |
9 | return nest('app.page.blob', blobPage) |
10 | |
11 | function blobPage (location) { |
12 | const { blob } = location |
13 | |
14 | return h('Blob', { title: blob.slice(0, 9) + '...' }, [ |
15 | h('iframe', { |
16 | src: api.blob.sync.url(blob), |
17 | sandbox: '' |
18 | }) |
19 | ]) |
20 | } |
21 | } |
22 |
Built with git-ssb-web