From 73c0e8a73f26da9595d96b4f8d4c55ed5641742e Mon Sep 17 00:00:00 2001 From: Berkeley Martinez Date: Wed, 15 Jul 2015 21:56:06 -0700 Subject: [PATCH] questions renders corrent test on number param --- common/app/routes/Hikes/components/Question.jsx | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/common/app/routes/Hikes/components/Question.jsx b/common/app/routes/Hikes/components/Question.jsx index fffd5337b8..b6d89351a1 100644 --- a/common/app/routes/Hikes/components/Question.jsx +++ b/common/app/routes/Hikes/components/Question.jsx @@ -42,9 +42,11 @@ export default contain( }, render() { - const { tests: [test =[]] } = this.props; + const { tests } = this.props; + const { number = '1' } = this.props.params; + + const [question, answer, info] = tests[number - 1] || []; - const [question, answer, info] = test; return (