mirror of
https://gitlab.com/MrFry/qmining-data-editor
synced 2025-04-01 20:24:01 +02:00
Initial commit, with fully working project :p
This commit is contained in:
commit
53b4158967
21 changed files with 894 additions and 0 deletions
33
src/components/Subject.js
Normal file
33
src/components/Subject.js
Normal file
|
@ -0,0 +1,33 @@
|
|||
import React, { PureComponent } from 'react'
|
||||
|
||||
import Question from './Question.js'
|
||||
|
||||
class Subject extends PureComponent {
|
||||
render () {
|
||||
const { subj, onChange, deleteQuestion } = this.props
|
||||
|
||||
if (subj) {
|
||||
return (
|
||||
<div >
|
||||
{subj.Questions.map((question, i) => {
|
||||
return (
|
||||
<Question
|
||||
deleteQuestion={deleteQuestion}
|
||||
onChange={onChange}
|
||||
key={i}
|
||||
subjInd={subj.ind}
|
||||
question={question}
|
||||
/>
|
||||
)
|
||||
})}
|
||||
</div>
|
||||
)
|
||||
} else {
|
||||
return (
|
||||
<div />
|
||||
)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
export default Subject
|
Loading…
Add table
Add a link
Reference in a new issue