Skip to content

Commit 386d863

Browse files
committed
Fix broken addquestion difficulty
1 parent bcd5b64 commit 386d863

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

peerprep/app/questions/new/page.tsx

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,11 @@ function NewQuestion({}: Props) {
116116
disabled={loading}
117117
label="Difficulty: "
118118
group="difficulty"
119-
options={{ Easy: 1, Medium: 2, Hard: 3 }}
119+
options={{
120+
Easy: Difficulty.Easy,
121+
Medium: Difficulty.Medium,
122+
Hard: Difficulty.Hard,
123+
}}
120124
onChange={handleFormTextInput}
121125
/>
122126
<FormTextAreaInput

peerprep/components/shared/form/RadioButtonGroup.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ interface Props {
55
label: string;
66
group: string;
77
options: {
8-
[label: string]: number;
8+
[label: string]: string;
99
};
1010
required?: boolean;
1111
disabled?: boolean;

0 commit comments

Comments
 (0)