Move Old style challenge to classic
This commit is contained in:
@ -5,7 +5,7 @@ import { connect } from 'react-redux';
|
|||||||
import { createSelector } from 'reselect';
|
import { createSelector } from 'reselect';
|
||||||
import PureComponent from 'react-pure-render/component';
|
import PureComponent from 'react-pure-render/component';
|
||||||
|
|
||||||
import Challenge from './Challenge.jsx';
|
import Classic from './classic/Classic.jsx';
|
||||||
import Step from './step/Step.jsx';
|
import Step from './step/Step.jsx';
|
||||||
import { fetchChallenge } from '../redux/actions';
|
import { fetchChallenge } from '../redux/actions';
|
||||||
import { challengeSelector } from '../redux/selectors';
|
import { challengeSelector } from '../redux/selectors';
|
||||||
@ -38,7 +38,7 @@ export class Challenges extends PureComponent {
|
|||||||
if (this.props.isStep) {
|
if (this.props.isStep) {
|
||||||
return <Step />;
|
return <Step />;
|
||||||
}
|
}
|
||||||
return <Challenge />;
|
return <Classic />;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -7,8 +7,8 @@ import PureComponent from 'react-pure-render/component';
|
|||||||
import Editor from './Editor.jsx';
|
import Editor from './Editor.jsx';
|
||||||
import SidePanel from './Side-Panel.jsx';
|
import SidePanel from './Side-Panel.jsx';
|
||||||
import Preview from './Preview.jsx';
|
import Preview from './Preview.jsx';
|
||||||
import { challengeSelector } from '../redux/selectors';
|
import { challengeSelector } from '../../redux/selectors';
|
||||||
import { updateFile } from '../redux/actions';
|
import { updateFile } from '../../redux/actions';
|
||||||
|
|
||||||
const mapStateToProps = createSelector(
|
const mapStateToProps = createSelector(
|
||||||
challengeSelector,
|
challengeSelector,
|
@ -8,7 +8,7 @@ import { Col, Row } from 'react-bootstrap';
|
|||||||
import TestSuite from './Test-Suite.jsx';
|
import TestSuite from './Test-Suite.jsx';
|
||||||
import Output from './Output.jsx';
|
import Output from './Output.jsx';
|
||||||
import ToolPanel from './Tool-Panel.jsx';
|
import ToolPanel from './Tool-Panel.jsx';
|
||||||
import { challengeSelector } from '../redux/selectors';
|
import { challengeSelector } from '../../redux/selectors';
|
||||||
|
|
||||||
const mapStateToProps = createSelector(
|
const mapStateToProps = createSelector(
|
||||||
challengeSelector,
|
challengeSelector,
|
@ -1,9 +1,9 @@
|
|||||||
import Challenges from './components/Challenges.jsx';
|
import Show from './components/Show.jsx';
|
||||||
import ShowMap from './components/map/Show.jsx';
|
import ShowMap from './components/map/Show.jsx';
|
||||||
|
|
||||||
export const challenges = {
|
export const challenges = {
|
||||||
path: 'challenges(/:dashedName)',
|
path: 'challenges(/:dashedName)',
|
||||||
component: Challenges,
|
component: Show,
|
||||||
onEnter(nextState, replace) {
|
onEnter(nextState, replace) {
|
||||||
// redirect /challenges to /map
|
// redirect /challenges to /map
|
||||||
if (nextState.location.pathname === '/challenges') {
|
if (nextState.location.pathname === '/challenges') {
|
||||||
|
Reference in New Issue
Block a user