mirror of
https://gitlab.com/MrFry/qmining-page
synced 2025-04-01 20:23:44 +02:00
major tidy
This commit is contained in:
parent
67b1fa2d37
commit
c19f24de87
24 changed files with 339 additions and 17 deletions
30
src/components/Subject.js
Normal file
30
src/components/Subject.js
Normal file
|
@ -0,0 +1,30 @@
|
|||
import React, { PureComponent } from 'react'
|
||||
|
||||
import Question from '../Question'
|
||||
|
||||
class Subject extends PureComponent {
|
||||
render () {
|
||||
const { subj } = this.props
|
||||
|
||||
if (subj) {
|
||||
return (
|
||||
<div >
|
||||
{subj.Questions.map((question, i) => {
|
||||
return (
|
||||
<Question
|
||||
key={i}
|
||||
question={question}
|
||||
/>
|
||||
)
|
||||
})}
|
||||
</div>
|
||||
)
|
||||
} else {
|
||||
return (
|
||||
<div />
|
||||
)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
export default Subject
|
Loading…
Add table
Add a link
Reference in a new issue