Skip to content

Commit 7f9e637

Browse files
committed
🐛 Fixed a issue with Queue settings which did not allow users to toggle some settings
1 parent 524282d commit 7f9e637

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

frontend/components/Course/InstructorQueuePage/QueueFormFields.tsx

+8-8
Original file line numberDiff line numberDiff line change
@@ -172,11 +172,6 @@ const QueueFormFields = ({
172172
}
173173
setInput({ ...input });
174174
};
175-
176-
const handlePinInputChange = (e, { checked }) => {
177-
input.pinEnabled = checked;
178-
setInput({ ...input });
179-
};
180175
/* PROPS UPDATE */
181176

182177
return (
@@ -246,7 +241,12 @@ const QueueFormFields = ({
246241
id="pin-toggle"
247242
toggle
248243
disabled={loading}
249-
onChange={handlePinInputChange}
244+
onClick={() =>
245+
setInput({
246+
...input,
247+
pinEnabled: !input.pinEnabled,
248+
})
249+
}
250250
/>
251251
</Form.Field>
252252

@@ -261,9 +261,9 @@ const QueueFormFields = ({
261261
name="rateLimitEnabled"
262262
id="rate-limit-toggle"
263263
toggle
264-
defaultChecked={input.rateLimitEnabled}
264+
checked={input.rateLimitEnabled}
265265
label="Enable queue rate-limiting"
266-
onChange={() =>
266+
onClick={() =>
267267
setInput({
268268
...input,
269269
rateLimitEnabled: !input.rateLimitEnabled,

0 commit comments

Comments
 (0)