Files: 64e6e544f024c42315d1103b3b6735dfb4a20f84 / plugs / router / sync / routes.js
507 bytesRaw
1 | const nest = require('depnest') |
2 | const isPoll = require('scuttle-poll/isPoll') |
3 | |
4 | exports.gives = nest('router.sync.routes') |
5 | exports.needs = nest({ |
6 | 'app.page.scryNew': 'first', |
7 | 'app.page.scryShow': 'first' |
8 | }) |
9 | |
10 | exports.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