diff --git a/common/app/routes/Hikes/components/Lecture.jsx b/common/app/routes/Hikes/components/Lecture.jsx index 5943c27334..8cd8c7aec0 100644 --- a/common/app/routes/Hikes/components/Lecture.jsx +++ b/common/app/routes/Hikes/components/Lecture.jsx @@ -1,6 +1,7 @@ import React, { PropTypes } from 'react'; -import { contain } from 'thundercats-react'; import { Col, Row, Panel } from 'react-bootstrap'; +import { Navigation } from 'react-router'; +import { contain } from 'thundercats-react'; import stampit from 'react-stampit'; import Vimeo from 'react-vimeo'; import debugFactory from 'debug'; @@ -31,28 +32,23 @@ export default contain( displayName: 'Lecture', propTypes: { - params: PropTypes.object + params: PropTypes.object, + currentHike: PropTypes.object }, handleError: debug, + handleFinish() { debug('loading questions'); - }, - - renderQuestions(questions) { - return questions.map(([question]) => { - return ( - - { question } - - ); - }); + const { dashedName } = this.props.params; + this.transitionTo(`hikes/${dashedName}/questions/1`); }, render() { const { title, - challengeSeed = ['1'] + challengeSeed = ['1'], + description = [] } = this.props.currentHike; const [ id ] = challengeSeed; @@ -64,12 +60,21 @@ export default contain( + + + + + { description.join('\n') } + + + + ); } - }) + }).compose(Navigation) ); diff --git a/common/app/routes/Hikes/index.js b/common/app/routes/Hikes/index.js index d8ec4d00e6..203380153e 100644 --- a/common/app/routes/Hikes/index.js +++ b/common/app/routes/Hikes/index.js @@ -14,7 +14,7 @@ export default { path: ':dashedName', component: Lecture }, { - path: ':dashedName/questions', + path: ':dashedName/questions/:number', component: Question }] }; diff --git a/package.json b/package.json index 6f515e52d8..19b2f2e51f 100644 --- a/package.json +++ b/package.json @@ -91,7 +91,7 @@ "react": "^0.13.3", "react-bootstrap": "^0.23.5", "react-router": "https://github.com/BerkeleyTrue/react-router#freecodecamp", - "react-stampit": "^0.6.1", + "react-stampit": "git+https://github.com/BerkeleyTrue/react-stampit.git#fcc", "react-vimeo": "^0.0.3", "request": "~2.53.0", "rx": "^2.5.3",
{ question }
+ { description.join('\n') } +