2016-05-13 22:34:40 -07:00
|
|
|
import Show from './components/Show.jsx';
|
2016-05-10 19:28:40 -07:00
|
|
|
import ShowMap from './components/map/Show.jsx';
|
2016-03-05 21:06:04 -08:00
|
|
|
|
2016-05-10 19:28:40 -07:00
|
|
|
export const challenges = {
|
2016-04-18 18:58:29 -07:00
|
|
|
path: 'challenges(/:dashedName)',
|
2016-05-13 22:34:40 -07:00
|
|
|
component: Show,
|
2016-04-18 18:58:29 -07:00
|
|
|
onEnter(nextState, replace) {
|
|
|
|
// redirect /challenges to /map
|
|
|
|
if (nextState.location.pathname === '/challenges') {
|
|
|
|
replace('/map');
|
|
|
|
}
|
|
|
|
}
|
2016-03-05 21:06:04 -08:00
|
|
|
};
|
2016-05-10 19:28:40 -07:00
|
|
|
|
|
|
|
export const map = {
|
|
|
|
path: 'map',
|
|
|
|
component: ShowMap
|
|
|
|
};
|