mirror of
https://github.com/freeCodeCamp/freeCodeCamp.git
synced 2026-01-07 09:03:27 -05:00
questions renders corrent test on number param
This commit is contained in:
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user