Skip to content

Commit cbd609d

Browse files
committed
fix lint
1 parent 509911f commit cbd609d

File tree

1 file changed

+11
-10
lines changed

1 file changed

+11
-10
lines changed

frontend/src/components/Questions/QuestionsTable.tsx

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ interface Question {
3535
const ITEMS_PER_PAGE_OPTIONS = [5, 10]; // Number of items to display per page
3636

3737
const InterviewQuestionsTable: React.FC = () => {
38-
const [questionsData, setQuestions] = useState<Question[]>([]);
38+
const [questionsData, setQuestionsData] = useState<Question[]>([]);
3939
const [selectedCategories, setSelectedCategories] = useState<string[]>([]);
4040
const [currentPage, setCurrentPage] = useState<number>(0);
4141
const [itemsPerPage, setItemsPerPage] = useState<number>(
@@ -52,10 +52,11 @@ const InterviewQuestionsTable: React.FC = () => {
5252
getQuestions();
5353
}
5454
getInterviewQuestions();
55+
// eslint-disable-next-line
5556
}, []);
5657

5758
useEffect(() => {
58-
setQuestions(questions);
59+
setQuestionsData(questions);
5960
}, [questions]);
6061

6162
const handleCategoriesChange = (event: SelectChangeEvent<unknown>) => {
@@ -110,9 +111,9 @@ const InterviewQuestionsTable: React.FC = () => {
110111
if (selected.length === 0) {
111112
return <em>Filter by category</em>;
112113
} else {
113-
return (selected as string[]).join(", ")}
114+
return (selected as string[]).join(", ");
114115
}
115-
}
116+
}}
116117
style={{ marginTop: "10px", marginBottom: "10px", width: "80%" }}
117118
>
118119
{uniqueCategories.map((category) => (
@@ -146,7 +147,7 @@ const InterviewQuestionsTable: React.FC = () => {
146147
color: "inherit",
147148
fontSize: "16px",
148149
fontWeight: "bold",
149-
textTransform: "initial"
150+
textTransform: "initial",
150151
}}
151152
>
152153
{question.title}
@@ -192,14 +193,14 @@ const InterviewQuestionsTable: React.FC = () => {
192193
{selectedQuestion && (
193194
<>
194195
<DialogTitle>{selectedQuestion.title}</DialogTitle>
195-
<DialogContent >
196-
<Typography variant="body2" style={{padding: "5px"}}>
197-
<b>Categories:</b> {selectedQuestion.categories.join(", ")}
196+
<DialogContent>
197+
<Typography variant="body2" style={{ padding: "5px" }}>
198+
<b>Categories:</b> {selectedQuestion.categories.join(", ")}
198199
</Typography>
199-
<Typography variant="body2" style={{padding: "5px"}}>
200+
<Typography variant="body2" style={{ padding: "5px" }}>
200201
<b>Difficulty:</b> {selectedQuestion.difficulty}
201202
</Typography>
202-
<Typography variant="body2" style={{padding: "5px"}}>
203+
<Typography variant="body2" style={{ padding: "5px" }}>
203204
<b>Description</b>: {selectedQuestion.description}
204205
</Typography>
205206
</DialogContent>

0 commit comments

Comments
 (0)