Skip to content

Commit bbd9022

Browse files
committed
Edit header titles for question pages
Remove unused imports
1 parent 0e40193 commit bbd9022

File tree

6 files changed

+20
-15
lines changed

6 files changed

+20
-15
lines changed

QuestionService/src/question/question.controller.ts

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,6 @@ import {addQuestion, db, deleteQuestion, updateQuestion} from "./question.servic
33
import {
44
getDocs,
55
collection,
6-
deleteDoc,
7-
doc,
8-
addDoc,
9-
setDoc,
106
} from "firebase/firestore";
117

128
interface Question {

frontend/src/components/Questions/AddQuestionTab.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ const AddQuestionTab: React.FC = () => {
4040
<Box component="span" padding={2} width='80%'>
4141
{addQuestions ?
4242
<React.Fragment>
43-
<Typography variant="h4" gutterBottom>
43+
<Typography variant="h5" gutterBottom>
4444
Add Question
4545
</Typography>
4646
<QuestionForm onSubmit={onSubmit} onCancel={onCancel} />

frontend/src/components/Questions/EditQuestionTab.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import Question from "./Question";
33
import Typography from '@mui/material/Typography';
44
import Grid from '@mui/material/Grid';
55
import Button from '@mui/material/Button';
6-
import {Box, Card, Paper} from "@mui/material";
6+
import {Box} from "@mui/material";
77
import QuestionForm from "./QuestionForm";
88

99
interface EditQuestionPreviewProps {

frontend/src/components/Questions/EditQuestionsTab.tsx

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,9 @@ import EditQuestionsTable from "./EditQuestionsTable";
33
import {Box, Button} from "@mui/material";
44
import Grid from "@mui/material/Grid";
55
import Question from "./Question";
6-
import {Delete} from "@mui/icons-material";
7-
import {addQuestion, deleteQuestion, updateQuestion} from "../../api/questions/data";
6+
import {deleteQuestion, updateQuestion} from "../../api/questions/data";
87
import {AxiosError} from "axios";
8+
import Typography from "@mui/material/Typography";
99

1010

1111
const EditQuestionsTab: React.FC = () => {
@@ -56,6 +56,9 @@ const EditQuestionsTab: React.FC = () => {
5656
<Box component="span" padding={2} width='80%'>
5757
{editQuestions ?
5858
<React.Fragment>
59+
<Typography variant="h5" gutterBottom>
60+
Edit Questions
61+
</Typography>
5962
<Grid container spacing={3}>
6063
<Grid item sm={12}>
6164
<EditQuestionsTable onEdit={onEdit} onDelete={onDelete}/>

frontend/src/pages/QuestionsManage.tsx

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,21 @@
1-
import { Box, CssBaseline } from "@mui/material";
1+
import {Box, CssBaseline, Typography} from "@mui/material";
22
import Navbar from "../components/Navbar";
33
import CenteredContainer from "../components/CenteredContainer";
4-
import QuestionsTable from "../components/Questions/QuestionsTable";
54
import AddQuestionTab from "../components/Questions/AddQuestionTab";
65
import EditQuestionsTab from "../components/Questions/EditQuestionsTab";
6+
import React from "react";
77

88
export default function QuestionsManage() {
99
return (
1010
<Box>
1111
<CssBaseline />
12-
<Navbar />
12+
<Navbar />
1313
<CenteredContainer>
14-
<QuestionsTable />
15-
<AddQuestionTab />
16-
<EditQuestionsTab />
14+
<Typography variant="h4" align="center" gutterBottom paddingTop={3}>
15+
Manage Question Repository
16+
</Typography>
17+
<AddQuestionTab />
18+
<EditQuestionsTab />
1719
</CenteredContainer>
1820
</Box>
1921
);

frontend/src/pages/QuestionsView.tsx

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,18 @@
1-
import { Box, CssBaseline } from "@mui/material";
1+
import {Box, CssBaseline, Typography} from "@mui/material";
22
import Navbar from "../components/Navbar";
33
import CenteredContainer from "../components/CenteredContainer";
44
import QuestionsTable from "../components/Questions/QuestionsTable";
5+
import React from "react";
56

67
export default function QuestionsView() {
78
return (
89
<Box>
910
<CssBaseline />
1011
<Navbar />
1112
<CenteredContainer>
13+
<Typography variant="h4" align="center" gutterBottom paddingTop={3}>
14+
Questions
15+
</Typography>
1216
<QuestionsTable />
1317
</CenteredContainer>
1418
</Box>

0 commit comments

Comments
 (0)