git ssb

0+

mixmix / patchbay-scry



Tree: 64e6e544f024c42315d1103b3b6735dfb4a20f84

Files: 64e6e544f024c42315d1103b3b6735dfb4a20f84 / plugs / router / sync / routes.js

507 bytesRaw
1const nest = require('depnest')
2const isPoll = require('scuttle-poll/isPoll')
3
4exports.gives = nest('router.sync.routes')
5exports.needs = nest({
6 'app.page.scryNew': 'first',
7 'app.page.scryShow': 'first'
8})
9
10exports.create = (api) => {
11 return nest('router.sync.routes', (sofar = []) => {
12 const pages = api.app.page
13
14 const routes = [
15 [ loc => loc.page === 'scry-new', pages.scryNew ],
16 [ loc => isPoll.meetingTime(loc), pages.scryShow ]
17 ]
18
19 return [...sofar, ...routes]
20 })
21}
22

Built with git-ssb-web