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:
		
							
								
								
									
										38
									
								
								src/components/Questions.js
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										38
									
								
								src/components/Questions.js
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,38 @@ | ||||
| import React, { PureComponent } from 'react' | ||||
|  | ||||
| import Question from './Question.js' | ||||
|  | ||||
| import styles from './Questions.module.css' | ||||
|  | ||||
| class Questions extends PureComponent { | ||||
|   render () { | ||||
|     const { subjs, onChange, deleteQuestion } = this.props | ||||
|  | ||||
|     return ( | ||||
|       <div> | ||||
|         {subjs.map((subj, i) => { | ||||
|           return ( | ||||
|             <div key={i}> | ||||
|               <div className={styles.subjName}> | ||||
|                 {subj.Name} | ||||
|               </div> | ||||
|               { subj.Questions.map((question, i) => { | ||||
|                 return ( | ||||
|                   <Question | ||||
|                     key={i} | ||||
|                     question={question} | ||||
|                     subjInd={subj.ind} | ||||
|                     onChange={onChange} | ||||
|                     deleteQuestion={deleteQuestion} | ||||
|                   /> | ||||
|                 ) | ||||
|               })} | ||||
|             </div> | ||||
|           ) | ||||
|         })} | ||||
|       </div> | ||||
|     ) | ||||
|   } | ||||
| } | ||||
|  | ||||
| export default Questions | ||||
		Reference in New Issue
	
	Block a user