Skip to content

Commit

Permalink
Notifcation Bug Fix + Comments Removed
Browse files Browse the repository at this point in the history
  • Loading branch information
ryantanen committed Oct 27, 2024
1 parent bf2a426 commit fb1086a
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 13 deletions.
5 changes: 3 additions & 2 deletions frontend/components/Course/CourseWrapper.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,9 @@ const CourseWrapper = ({ render, ...props }: CourseProps) => {
useEffect(() => setSupportsNotifs(browserSupportsNotifications()), []);

const toggleNotifs = () => {
setNotifs(!notifs);
localStorage.setItem("notifs", !notifs ? "true" : "false");
const newNotifs = !notifs;
setNotifs(newNotifs);
localStorage.setItem("notifs", newNotifs ? "true" : "false");
document.body.focus();
};

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,7 @@ const QueueFormFields = ({

return (
<>
<Form.Field>
<Form.Field required>
<label htmlFor="form-name">Name</label>
<Form.Input
id="form-name"
Expand All @@ -199,7 +199,7 @@ const QueueFormFields = ({
{`Characters: ${nameCharCount}/100`}
</div>
</Form.Field>
<Form.Field>
<Form.Field required>
<label htmlFor="form-desc">Description</label>
<Form.TextArea
id="form-desc"
Expand Down Expand Up @@ -410,6 +410,11 @@ const QueueFormFields = ({
width={2}
size="mini"
type="number"
onKeyPress={(event) => {
if (!/[0-9]/.test(event.key)) {
event.preventDefault();
}
}}
min="1"
id="timer-questions"
error={!validQuestionTime}
Expand Down
9 changes: 0 additions & 9 deletions frontend/types.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -104,15 +104,6 @@ export type Queue = BaseQueue &
}
>;

// export type Queue =
// | (BaseQueue & { rateLimitEnabled: false })
// | (BaseQueue & {
// rateLimitEnabled: true;
// rateLimitLength: number;
// rateLimitQuestions: number;
// rateLimitMinutes: number;
// });

// "ASKED" "WITHDRAWN" "ACTIVE" "REJECTED" "ANSWERED"
export enum QuestionStatus {
ASKED = "ASKED",
Expand Down

0 comments on commit fb1086a

Please sign in to comment.