2016-06-09 16:02:51 -07:00
|
|
|
import { modernChallenges, map, challenges } from './challenges';
|
2015-11-19 22:45:31 -08:00
|
|
|
import NotFound from '../components/NotFound/index.jsx';
|
2016-06-20 21:01:14 -07:00
|
|
|
import { addLang } from '../utils/lang';
|
2016-07-15 14:32:42 -07:00
|
|
|
import settings from './settings';
|
2015-07-03 17:40:12 -07:00
|
|
|
|
2015-06-17 21:04:28 -07:00
|
|
|
export default {
|
2016-06-17 12:35:10 -07:00
|
|
|
path: '/:lang',
|
2016-06-17 22:20:20 -07:00
|
|
|
indexRoute: {
|
|
|
|
|
onEnter(nextState, replace) {
|
|
|
|
|
const { lang } = nextState.params;
|
|
|
|
|
const { pathname } = nextState.location;
|
|
|
|
|
replace(addLang(pathname, lang));
|
|
|
|
|
}
|
|
|
|
|
},
|
2015-09-14 12:12:31 -07:00
|
|
|
childRoutes: [
|
2016-03-21 15:39:45 -07:00
|
|
|
challenges,
|
2016-06-09 16:02:51 -07:00
|
|
|
modernChallenges,
|
2016-03-21 15:39:45 -07:00
|
|
|
map,
|
2016-07-15 14:32:42 -07:00
|
|
|
settings,
|
2015-11-19 22:45:31 -08:00
|
|
|
{
|
|
|
|
|
path: '*',
|
|
|
|
|
component: NotFound
|
|
|
|
|
}
|
2015-09-14 12:12:31 -07:00
|
|
|
]
|
2015-06-17 21:04:28 -07:00
|
|
|
};
|