Skip to content

Commit 853bd07

Browse files
committed
Refactored Queue Forms to make consistent with other forms and between each other
1 parent 6921ea8 commit 853bd07

File tree

10 files changed

+683
-853
lines changed

10 files changed

+683
-853
lines changed

frontend/components/Course/InstructorQueuePage/CreateQueue/CreateQueue.tsx

-334
This file was deleted.

frontend/components/Course/InstructorQueuePage/InstructorQueuePage.tsx

+2-2
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import Snackbar from "@material-ui/core/Snackbar";
66
import InstructorQueues from "./InstructorQueues";
77
import Announcements from "../Announcements";
88
import QueueSettings from "./QueueSettings/QueueSettings";
9-
import CreateQueue from "./CreateQueue/CreateQueue";
9+
import QueueCreate from "./QueueCreate/QueueCreate";
1010
import { AuthUserContext } from "../../../context/auth";
1111
import { useQueues, useStaff } from "../../../hooks/data-fetching/course";
1212
import {
@@ -143,7 +143,7 @@ const InstructorQueuePage = (props: InstructorQueuePageProps) => {
143143
)}
144144
{pageState.kind === PageStateEnum.CREATE && (
145145
<Grid.Row style={{ marginTop: "1rem" }}>
146-
<CreateQueue
146+
<QueueCreate
147147
courseId={courseId}
148148
mutate={mutate}
149149
successFunc={() => setSuccess(true)}

frontend/components/Course/InstructorQueuePage/QuestionCard.tsx

+13-11
Original file line numberDiff line numberDiff line change
@@ -197,17 +197,19 @@ const QuestionCard = (props: QuestionCardProps) => {
197197
inverted
198198
position="left center"
199199
/>
200-
<QuestionTimer
201-
questionStartTime={
202-
question.timeResponseStarted ||
203-
question.timeAsked
204-
}
205-
timerStartTime={
206-
(queue.questionTimerEnabled &&
207-
queue.questionTimerStartTime) ||
208-
10
209-
}
210-
/>
200+
{queue.questionTimerEnabled &&
201+
question.timeResponseStarted && (
202+
<QuestionTimer
203+
questionStartTime={
204+
question.timeResponseStarted
205+
}
206+
timerStartTime={
207+
(queue.questionTimerEnabled &&
208+
queue.questionTimerStartTime) ||
209+
10
210+
}
211+
/>
212+
)}
211213
</div>
212214
</Header>
213215
</div>

0 commit comments

Comments
 (0)