ff-stream-web

git clone git://archive.git.mtrnord.blog/MTRNord/ff-stream-web.git
Log | Files | Refs | README | LICENSE

index.js (1083B)


      1 /**
      2  * React Starter Kit (https://www.reactstarterkit.com/)
      3  *
      4  * Copyright © 2014-present Kriasoft, LLC. All rights reserved.
      5  *
      6  * This source code is licensed under the MIT license found in the
      7  * LICENSE.txt file in the root directory of this source tree.
      8  */
      9 
     10 /* eslint-disable global-require */
     11 
     12 // The top-level (parent) route
     13 export default {
     14 
     15   path: '/',
     16 
     17   // Keep in mind, routes are evaluated in order
     18   children: [
     19     require('./home').default,
     20     require('./contact').default,
     21     require('./login').default,
     22     require('./register').default,
     23     require('./about').default,
     24     require('./privacy').default,
     25     require('./admin').default,
     26 
     27     // Wildcard routes, e.g. { path: '*', ... } (must go last)
     28     require('./notFound').default,
     29   ],
     30 
     31   async action({ next }) {
     32     // Execute each child route until one of them return the result
     33     const route = await next();
     34 
     35     // Provide default values for title, description etc.
     36     route.title = `${route.title || 'Untitled Page'}`;
     37     route.description = route.description || '';
     38 
     39     return route;
     40   },
     41 
     42 };