UNPKG

@bbc/spartacus

Version:
21 lines (16 loc) 716 B
'use strict'; Object.defineProperty(exports, "__esModule", { value: true }); var HelloWorld = {}; var getInitialData = {}; var serviceRegex = 'news|persian'; // this gets passed to universal-react-app which passes the regex on to react-router-config var regexPath = exports.regexPath = '/:service(' + serviceRegex + ')/:id?'; var routes = [{ path: regexPath, // the path for react-router to match against with named params EG: :service exact: true, component: HelloWorld, // the component you want to render with the data from getInitialData getInitialData: getInitialData // a method which defines the URL to get data from and the params to pass through to the component }]; exports.default = routes;