Skip to content

Commit d3ad357

Browse files
committed
Fix eslint issues in frontend
1 parent f931a5b commit d3ad357

File tree

7 files changed

+3
-13
lines changed

7 files changed

+3
-13
lines changed

frontend/src/components/CollabProblemSolverLeft.tsx

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
// ProblemSolverLeft.jsx
22
import React, {useEffect } from 'react';
3-
import { useParams } from 'react-router-dom';
43
import {
54
Paper,
65
Typography,
@@ -18,8 +17,6 @@ function CollabProblemSolverLeft({questionNumber}: {questionNumber: string}) {
1817
// Find the question that matches the questionId
1918
const question = questions.find((q) => q.id === questionId);
2019
console.log(question)
21-
// console.log(questions)
22-
// console.log(question)
2320
useEffect(() => {
2421
// Fetch initial code or other data as needed
2522
// You can set the initial code or other data here

frontend/src/components/CollabProblemSolverRight.tsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ import { v4 as uuidv4 } from "uuid";
88

99
import { DefaultEventsMap } from "@socket.io/component-emitter";
1010
import PartySocket from "partysocket";
11-
import socket from "./MatchingService/socket";
1211

1312
interface ChatMessage {
1413
id: string;

frontend/src/components/Navbar.tsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@ import MenuIcon from "@mui/icons-material/Menu";
1616
import AdbIcon from "@mui/icons-material/Adb";
1717
import { useAuth } from "../auth/auth.context";
1818
import { useNavigate } from "react-router-dom";
19-
import { useData } from "../data/data.context";
2019

2120
const pages = [
2221
{

frontend/src/components/Questions/QuestionForm.tsx

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -45,10 +45,9 @@ const QuestionForm: React.FC<QuestionFormProps> = ({
4545
{ value: "Medium", label: "Medium" },
4646
{ value: "Hard", label: "Hard" },
4747
];
48-
const { questions, getQuestions, loading } = useData();
48+
const { questions, getQuestions } = useData();
4949
const [openSnackbar, setOpenSnackbar] = useState(false);
5050
const [snackbarMessage, setSnackbarMessage] = useState("");
51-
const [allQuestions, setAllQuestions] = useState();
5251
const [showSimilarQuestionsDialog, setShowSimilarQuestionsDialog] =
5352
useState(false);
5453
const [similarQuestions, setSimilarQuestions] = useState<Question[]>([]);
@@ -57,7 +56,6 @@ const QuestionForm: React.FC<QuestionFormProps> = ({
5756
getQuestions();
5857
}
5958
getInterviewQuestions();
60-
// console.log("here");
6159
// eslint-disable-next-line react-hooks/exhaustive-deps
6260
}, []);
6361

frontend/src/pages/App.tsx

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,6 @@ import Home from "../components/Home";
44
import "./App.css";
55
import CenteredContainer from "../components/CenteredContainer";
66
import QuestionsTable from "../components/Questions/QuestionsTable";
7-
import AddQuestionTab from "../components/Questions/AddQuestionTab";
8-
import EditQuestionsTab from "../components/Questions/EditQuestionsTab";
97

108
export default function App() {
119
return (

frontend/src/pages/createAdmin.tsx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ import {
33
Box,
44
Button,
55
CssBaseline,
6-
Link,
76
TextField,
87
Typography,
98
} from "@mui/material";
@@ -13,7 +12,7 @@ import PasswordField from "../components/PasswordField";
1312
import { useAuth } from "../auth/auth.context";
1413

1514
export default function CreateAdmin() {
16-
const { user, error, signUpAdmin } = useAuth();
15+
const { error, signUpAdmin } = useAuth();
1716
const [email, setEmail] = useState("");
1817
const [password, setPassword] = useState("");
1918
const [creation, setCreation] = useState(false);

frontend/src/pages/profile.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ export default function Profile() {
8181
</Grid>
8282
</Grid>
8383
<DeleteButtonModal/>
84-
{user?.role == 'master' && <AdminUsersTable/>}
84+
{user?.role === 'master' && <AdminUsersTable/>}
8585
</Container>
8686
</Box>
8787
);

0 commit comments

Comments
 (0)