diff --git a/common/app/routes/Hikes/components/Lecture.jsx b/common/app/routes/Hikes/components/Lecture.jsx
index a5a7cdec4e..5943c27334 100644
--- a/common/app/routes/Hikes/components/Lecture.jsx
+++ b/common/app/routes/Hikes/components/Lecture.jsx
@@ -52,9 +52,7 @@ export default contain(
render() {
const {
title,
- challengeSeed = ['1'],
- description = [],
- tests: questions
+ challengeSeed = ['1']
} = this.props.currentHike;
const [ id ] = challengeSeed;
@@ -70,20 +68,6 @@ export default contain(
videoId={ id } />
-
-
-
-
- { description.join('\n') }
-
-
-
-
-
-
- { this.renderQuestions(questions) }
-
-
);
}
diff --git a/common/app/routes/Hikes/components/Question.jsx b/common/app/routes/Hikes/components/Question.jsx
index 6412002004..fffd5337b8 100644
--- a/common/app/routes/Hikes/components/Question.jsx
+++ b/common/app/routes/Hikes/components/Question.jsx
@@ -1,19 +1,59 @@
import React, { PropTypes } from 'react';
+import { Col, Row, Panel } from 'react-bootstrap';
+import { contain } from 'thundercats-react';
import stampit from 'react-stampit';
// import debugFactory from 'debug';
-export default stampit(React, {
- displayName: 'Question',
-
- propTypes: {
- params: PropTypes.object
+export default contain(
+ {
+ store: 'hikesStore',
+ map({ hikes, currentHike }) {
+ const { tests = [] } = currentHike;
+ return {
+ hikes,
+ currentHike,
+ tests
+ };
+ },
+ fetchAction: 'hikesActions.getHike',
+ getPayload({ currentHike, hikes, params: { dashedName } }) {
+ const filterRegex = new RegExp(dashedName, 'i');
+ if (currentHike && filterRegex.test(currentHike.dashedName)) {
+ return {
+ hikes: [],
+ isPrimed: true,
+ dashedName
+ };
+ }
+ return {
+ hikes,
+ isPrimed: false,
+ dashedName: dashedName
+ };
+ }
},
+ stampit(React, {
+ displayName: 'Question',
- render() {
- return (
-
-
Question time
-
- );
- }
-});
+ propTypes: {
+ params: PropTypes.object,
+ currentHike: PropTypes.object,
+ tests: PropTypes.array
+ },
+
+ render() {
+ const { tests: [test =[]] } = this.props;
+
+ const [question, answer, info] = test;
+ return (
+
+
+
+ { question }
+
+
+
+ );
+ }
+ })
+);
diff --git a/common/app/routes/Hikes/questions.json b/common/app/routes/Hikes/questions.json
deleted file mode 100644
index 2c63c08510..0000000000
--- a/common/app/routes/Hikes/questions.json
+++ /dev/null
@@ -1,2 +0,0 @@
-{
-}
diff --git a/common/app/routes/Hikes/videos.json b/common/app/routes/Hikes/videos.json
deleted file mode 100644
index 628bf3dc6f..0000000000
--- a/common/app/routes/Hikes/videos.json
+++ /dev/null
@@ -1,16 +0,0 @@
-[{
- "title": "FCC Computer Basics 1: the 4 basic parts of a computer",
- "id": "132542064"
-}, {
- "title": "FCC Computer Basics 2: More Computer Hardware",
- "id": "132542458"
-}, {
- "title": "FCC Computer Basics 3: Intro to Binary Code",
- "id": "132542757"
-}, {
- "title": "FCC Computer Basics 4: Decoding a Binary Number",
- "id": "132543332"
-}, {
- "title": "FCC Computer Basics 5: How To Measure Data Size",
- "id": "132543959"
-}]