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

19 lines
397 B
JavaScript
Raw Normal View History

2016-05-13 22:34:40 -07:00
import Show from './components/Show.jsx';
import ShowMap from './components/map/Show.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
};
export const map = {
path: 'map',
component: ShowMap
};