diff --git a/public/iips_logo2.png b/public/iips_logo2.png new file mode 100644 index 0000000..603c4c0 Binary files /dev/null and b/public/iips_logo2.png differ diff --git a/public/index.html b/public/index.html index aeda8d7..3444435 100644 --- a/public/index.html +++ b/public/index.html @@ -2,7 +2,8 @@ - + + + Teacher Portal diff --git a/src/Create_paper/Createpaper.jsx b/src/Create_paper/Createpaper.jsx index 8fba87a..3f36580 100644 --- a/src/Create_paper/Createpaper.jsx +++ b/src/Create_paper/Createpaper.jsx @@ -38,6 +38,7 @@ const Createpaper = () => { useEffect(()=> { + document.title = "Create-Paper"; setTimeout(()=>{setLoading(false)},1000); },[]); diff --git a/src/Edit_paper/Editpaper.jsx b/src/Edit_paper/Editpaper.jsx index f029c21..96194b9 100644 --- a/src/Edit_paper/Editpaper.jsx +++ b/src/Edit_paper/Editpaper.jsx @@ -33,6 +33,7 @@ const Editpaper = () => { useEffect(()=> { + document.title = "Edit-Paper"; setTimeout(()=>{setLoading(false)},1000); },[]); diff --git a/src/Forgot_Password/Forgot_Password.jsx b/src/Forgot_Password/Forgot_Password.jsx index b0bec10..864ba7e 100644 --- a/src/Forgot_Password/Forgot_Password.jsx +++ b/src/Forgot_Password/Forgot_Password.jsx @@ -17,6 +17,7 @@ const ForgotPassword = () => { useEffect(()=> { + document.title = "Forgot Password"; setTimeout(()=>{setLoading(false);},1000); },[]); diff --git a/src/Login/Login.jsx b/src/Login/Login.jsx index 9f12736..b57e4a9 100644 --- a/src/Login/Login.jsx +++ b/src/Login/Login.jsx @@ -37,6 +37,8 @@ function Login() { } useEffect(() => { + document.title = "Teacher:login"; + // Check if session ID exists in local storage and is still valid const sessionId = localStorage.getItem("sessionId"); if (sessionId) { diff --git a/src/QuestionPaperDashboard/QuestionPaperDashboard.jsx b/src/QuestionPaperDashboard/QuestionPaperDashboard.jsx index 4e4892e..df8c8ff 100644 --- a/src/QuestionPaperDashboard/QuestionPaperDashboard.jsx +++ b/src/QuestionPaperDashboard/QuestionPaperDashboard.jsx @@ -31,6 +31,7 @@ const QuestionPaperDashboard = () => { const [hoveredItem, setHoveredItem] = useState(null); useEffect(() => { + document.title = "Question-paper-Dashboard"; const fetchQuestions = async () => { try { const res = await axios.post( diff --git a/src/TeacherDashboard/TeacherDashboard.jsx b/src/TeacherDashboard/TeacherDashboard.jsx index 802c76b..8e8fac5 100644 --- a/src/TeacherDashboard/TeacherDashboard.jsx +++ b/src/TeacherDashboard/TeacherDashboard.jsx @@ -1,15 +1,16 @@ -import React from 'react'; +import React, { useEffect } from 'react'; import Navbar from '../Navbar/Navbar'; import Papers from '../papers/papers'; +const TeacherDashboard = () => { + useEffect(() => { + document.title = "Teacher Dashboard"; + }, []); // Empty dependency array to run only on component mount -const TeacherDashboard=()=> -{ - return( -
- - - + return ( +
+ +
); } diff --git a/src/edit_question/EditQuestion.jsx b/src/edit_question/EditQuestion.jsx index 4765f0f..64feb5d 100644 --- a/src/edit_question/EditQuestion.jsx +++ b/src/edit_question/EditQuestion.jsx @@ -10,6 +10,7 @@ import AlertModal from '../AlertModal/AlertModal'; // Import the AlertModal comp import Loader from '../Loader/Loader'; const EditQuestion = () => { + document.title = "Edit-Question"; const { paperId } = useParams(); const location = useLocation(); diff --git a/src/edit_ready_question/EditReadyQuestion.jsx b/src/edit_ready_question/EditReadyQuestion.jsx index 5a68326..7aba0ed 100644 --- a/src/edit_ready_question/EditReadyQuestion.jsx +++ b/src/edit_ready_question/EditReadyQuestion.jsx @@ -10,6 +10,7 @@ import AlertModal from '../AlertModal/AlertModal'; // Import the AlertModal comp const EditReadyQuestion = () => { + document.title = "Ready Question"; const { paperId } = useParams(); const location = useLocation(); diff --git a/src/error/error404.jsx b/src/error/error404.jsx index f3d4c96..a30f766 100644 --- a/src/error/error404.jsx +++ b/src/error/error404.jsx @@ -18,6 +18,8 @@ export default function Error404() { } }; + + return ( <> {sessionId && } diff --git a/src/papers/papers.jsx b/src/papers/papers.jsx index 725080f..17d2356 100644 --- a/src/papers/papers.jsx +++ b/src/papers/papers.jsx @@ -25,6 +25,7 @@ function Papers() { const teacherId = localStorage.getItem("teacherId"); useEffect(() => { + const fetchPapers = async () => { try { const response = await axios.post(