diff --git a/frontend/components/CollabPage/CollabPage.tsx b/frontend/components/CollabPage/CollabPage.tsx
index f6b7d07..b5af832 100644
--- a/frontend/components/CollabPage/CollabPage.tsx
+++ b/frontend/components/CollabPage/CollabPage.tsx
@@ -13,7 +13,6 @@ import {
DialogContent,
Stack,
Grid,
- Fab,
} from "@mui/material";
import CodeEditor from "./CodeEditor";
import dynamic from "next/dynamic";
@@ -97,8 +96,8 @@ const CollabPage = () => {
};
const questionPanelProps = {
- question_number: questionNumber + 1,
- question: questions[questionNumber],
+ question_number: questionNumber,
+ question: questions,
};
// Called when Next question button is pressed by this user
@@ -285,18 +284,16 @@ const CollabPage = () => {
}, []);
return (
-
-
+
+
- {questions[questionNumber] ? (
+
- ) : (
- No more questions available.
- )}
+
-
+
{!isEndingSession && (
+ return question[question_number] ? (
+
- Question {question_number}:{" "}
- {question ? question.title : "No title found"}
+ Question {question_number + 1}:{" "}
+ {question
+ ? question[question_number].title
+ : "No title found"}
{/* Use pre element for preserving white spaces and new lines */}
-
- {question ? question.description : "No description found"}
+
+ {question
+ ? question[question_number].description
+ : "No description found"}
+ ) : (
+
+ No more questions available.
+
);
}
diff --git a/frontend/components/CollabPage/RejectEndSessionSnackBar.tsx b/frontend/components/CollabPage/RejectEndSessionSnackBar.tsx
deleted file mode 100644
index ac42fd3..0000000
--- a/frontend/components/CollabPage/RejectEndSessionSnackBar.tsx
+++ /dev/null
@@ -1,66 +0,0 @@
-//Source: https://mui.com/material-ui/react-snackbar/
-import * as React from "react";
-import Snackbar from "@mui/material/Snackbar";
-import IconButton from "@mui/material/IconButton";
-import CloseIcon from "@mui/icons-material/Close";
-import MuiAlert, { AlertProps } from "@mui/material/Alert";
-
-const Alert = React.forwardRef(function Alert(
- props,
- ref
-) {
- return ;
-});
-
-interface RejectEndSessionSnackbarProps {
- rejectEndSessionSnackBarIsOpen: boolean;
- onClose: () => void;
-}
-
-export default function SimpleSnackbar({
-
- rejectEndSessionSnackBarIsOpen,
- onClose,
-}: RejectEndSessionSnackbarProps) {
- const handleClose = (
- event: React.SyntheticEvent | Event,
- reason?: string
- ) => {
- if (reason === "clickaway") {
- return;
- }
- onClose();
- };
-
- const action = (
-
-
-
-
-
- );
-
- return (
-
-
-
- End session request rejected
-
-
-
- );
-}
diff --git a/frontend/components/CollabPage/RejectQuestionSnackBar.tsx b/frontend/components/CollabPage/RejectQuestionSnackBar.tsx
deleted file mode 100644
index 4403324..0000000
--- a/frontend/components/CollabPage/RejectQuestionSnackBar.tsx
+++ /dev/null
@@ -1,65 +0,0 @@
-//Source: https://mui.com/material-ui/react-snackbar/
-import * as React from "react";
-import Snackbar from "@mui/material/Snackbar";
-import IconButton from "@mui/material/IconButton";
-import CloseIcon from "@mui/icons-material/Close";
-import MuiAlert, { AlertProps } from "@mui/material/Alert";
-
-const Alert = React.forwardRef(function Alert(
- props,
- ref
-) {
- return ;
-});
-
-interface SimpleSnackbarProps {
- snackBarIsOpen: boolean;
- onClose: () => void;
-}
-
-export default function SimpleSnackbar({
- snackBarIsOpen,
- onClose,
-}: SimpleSnackbarProps) {
- const handleClose = (
- event: React.SyntheticEvent | Event,
- reason?: string
- ) => {
- if (reason === "clickaway") {
- return;
- }
- onClose();
- };
-
- const action = (
-
-
-
-
-
- );
-
- return (
-
-
-
- Next question request rejected
-
-
-
- );
-}
diff --git a/frontend/components/QuestionsPage/QuestionsPage.tsx b/frontend/components/QuestionsPage/QuestionsPage.tsx
index 0da3fbf..503cc3d 100644
--- a/frontend/components/QuestionsPage/QuestionsPage.tsx
+++ b/frontend/components/QuestionsPage/QuestionsPage.tsx
@@ -95,12 +95,12 @@ const QuestionPage = () => {
}
setOpenResetDialog(false);
return response.status;
- }
+ };
const confirmDialogProps = {
open: openResetDialog,
setOpen: setOpenResetDialog,
handleConfirm: setToDefaultQns,
- }
+ };
useEffect(() => {
const fetchQuestions = async () => {
@@ -122,7 +122,7 @@ const QuestionPage = () => {
addQuestion={addQuestion}
/>
)}
-
+
{
>
-
+
>
)}