Skip to content

Commit 3864809

Browse files
authored
Merge pull request #251 from makeopensource/100-edit-modals
100 - Edit modals
2 parents 5487d26 + 44cc4c6 commit 3864809

File tree

4 files changed

+326
-227
lines changed

4 files changed

+326
-227
lines changed

devU-client/src/components/listItems/assignmentProblemListItem.tsx

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,9 @@ type Props = {
1414
const AssignmentProblemListItem = ({problem, handleChange, disabled}: Props) => {
1515
const [meta, setMeta] = useState<{options: {[key:string]: string}, type: string}>()
1616

17+
1718
const getMeta = () => {
1819
setMeta(problem.metadata)
19-
2020
}
2121

2222
useEffect(() => {
@@ -44,7 +44,9 @@ const AssignmentProblemListItem = ({problem, handleChange, disabled}: Props) =>
4444
id={problem.problemName}
4545
/>
4646
</div>
47-
)} else if(type == "MCQ-mult") {
47+
)}
48+
49+
else if(type == "MCQ-mult") {
4850
const options = meta.options
4951
if (!options){
5052
return <div></div>
@@ -66,7 +68,9 @@ const AssignmentProblemListItem = ({problem, handleChange, disabled}: Props) =>
6668
</span>{/* custom checkbox */}
6769
</label>))}
6870
</div>)
69-
} else if(type == "MCQ-single") {
71+
}
72+
73+
else if(type == "MCQ-single") {
7074
const options = meta.options
7175
if (!options){
7276
return <div></div>
@@ -85,7 +89,9 @@ const AssignmentProblemListItem = ({problem, handleChange, disabled}: Props) =>
8589
<span className={styles.radio}></span>{/* custom radio button */}
8690
</label>))}
8791
</div>)
88-
} else {
92+
}
93+
94+
else {
8995
return(
9096
<div>{console.log(meta)}Unknown type, something is wrong on the backend!</div>)
9197
}

0 commit comments

Comments
 (0)