diff --git a/frontend/components/Course/InstructorQueuePage/QueueFormFields.tsx b/frontend/components/Course/InstructorQueuePage/QueueFormFields.tsx index b5925f61..a40bf964 100644 --- a/frontend/components/Course/InstructorQueuePage/QueueFormFields.tsx +++ b/frontend/components/Course/InstructorQueuePage/QueueFormFields.tsx @@ -172,11 +172,6 @@ const QueueFormFields = ({ } setInput({ ...input }); }; - - const handlePinInputChange = (e, { checked }) => { - input.pinEnabled = checked; - setInput({ ...input }); - }; /* PROPS UPDATE */ return ( @@ -246,7 +241,12 @@ const QueueFormFields = ({ id="pin-toggle" toggle disabled={loading} - onChange={handlePinInputChange} + onClick={() => + setInput({ + ...input, + pinEnabled: !input.pinEnabled, + }) + } /> @@ -261,9 +261,9 @@ const QueueFormFields = ({ name="rateLimitEnabled" id="rate-limit-toggle" toggle - defaultChecked={input.rateLimitEnabled} + checked={input.rateLimitEnabled} label="Enable queue rate-limiting" - onChange={() => + onClick={() => setInput({ ...input, rateLimitEnabled: !input.rateLimitEnabled,