Files
freeCodeCamp/common/app/routes/challenges/index.js

24 lines
485 B
JavaScript
Raw Normal View History

2016-05-13 22:34:40 -07:00
import Show from './components/Show.jsx';
import Map from './components/map/Map.jsx';
2016-03-05 21:06:04 -08: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-06-09 16:02:51 -07:00
export const modernChallenges = {
path: 'challenges/:block/:dashedName',
component: Show
};
export const map = {
path: 'map',
component: Map
};