24 lines
494 B
JavaScript
24 lines
494 B
JavaScript
import Show from './components/Show.jsx';
|
|
import ShowMap from './components/map/Show.jsx';
|
|
|
|
export const challenges = {
|
|
path: 'challenges(/:dashedName)',
|
|
component: Show,
|
|
onEnter(nextState, replace) {
|
|
// redirect /challenges to /map
|
|
if (nextState.location.pathname === '/challenges') {
|
|
replace('/map');
|
|
}
|
|
}
|
|
};
|
|
|
|
export const modernChallenges = {
|
|
path: 'challenges/:block/:dashedName',
|
|
component: Show
|
|
};
|
|
|
|
export const map = {
|
|
path: 'map',
|
|
component: ShowMap
|
|
};
|