questions renders corrent test on number param

This commit is contained in:
Berkeley Martinez
2015-07-15 21:56:06 -07:00
parent 04a5a081b3
commit 73c0e8a73f

View File

@ -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 (
<Col xs={ 12 }>
<Row>