@@ -4,6 +4,7 @@ import Header from "./Components/Header.jsx";
44import Footer from "./Components/Footer.jsx" ;
55import StudentLayout from "./Components/StudentLayout.jsx" ;
66
7+
78// Components
89import Home from "./components/Home.jsx" ;
910import About from "./components/About.jsx" ;
@@ -25,29 +26,29 @@ import Calendar from "./Components/Calendar.jsx";
2526import Inbox from "./Components/Inbox.jsx" ;
2627import TutorView from "./Components/TutorView.jsx" ;
2728import AssignmentPage from "./Components/AssignmentPage.jsx" ;
28-
29- import AssignmentCreate from "./Components/AssignmentCreate.jsx" ;
30-
3129import WhiteboardCanvas from "./Components/WhiteboardCanvas.jsx" ;
3230import LandingPage from "./Components/LandingPage.jsx" ;
33-
3431import Settings from "./Components/Settings.jsx" ;
35-
32+ import Questionnaire from "./Components/Questionnaire.jsx" ;
33+ import AssignmentCreate from "./Components/AssignmentCreate.jsx" ;
3634
3735
3836function App ( ) {
3937 const location = useLocation ( ) ;
4038
39+
4140 useEffect ( ( ) => {
4241 window . scrollTo ( 0 , 0 ) ;
4342 } , [ location ] ) ;
4443
44+
4545 return (
4646 < div className = "App" >
4747 { ( location . pathname !== "/login" && location . pathname !== "/dateofbirth" && location . pathname !== "/SignUp" &&
4848 location . pathname !== "/StudentView" && location . pathname !== "/calendar" &&
4949 location . pathname !== "/chat" && location . pathname !== "/videocall" && location . pathname !== "/tutorview" ) && < Header /> }
5050
51+
5152 < Routes >
5253 { /* Public Routes */ }
5354 < Route path = "/" element = { < Home /> } />
@@ -64,18 +65,12 @@ function App() {
6465 < Route path = "/faqs" element = { < FAQS /> } />
6566 < Route path = "/findTutor" element = { < FindTutor /> } />
6667 < Route path = "/chat" element = { < Chat /> } />
68+ < Route path = "/WhiteboardCanvas" element = { < WhiteboardCanvas /> } />
6769
68- < Route path = "/videocall" element = { < VideoCall /> } />
69- { /* <Route path="/Calendar" element={<Calendar />} /> */ }
70-
71- { /* Jose needs this for this tutorView and inbox to work */ }
72- < Route path = "/tutorview" element = { < TutorView /> } />
73- < Route path = "/Calendar" element = { < Calendar /> } />
74- < Route path = "/Inbox" element = { < Inbox /> } />
75- < Route path = "/tutorview" element = { < TutorView /> } />
76- < Route path = "/assignment_create" element = { < AssignmentCreate /> } />
7770
78- < Route path = "/WhiteboardCanvas" element = { < WhiteboardCanvas /> } />
71+ { /* Profile Setup Routes */ }
72+ < Route path = "/student-questionnaire" element = { < Questionnaire userRole = { 3 } /> } />
73+ < Route path = "/tutor-questionnaire" element = { < Questionnaire userRole = { 1 } /> } />
7974
8075
8176 { /* Student Routes with Layout */ }
@@ -93,17 +88,12 @@ function App() {
9388 < Route path = "/student/learn_more" element = { < StudentLayout > < Learn_more /> </ StudentLayout > } />
9489 < Route path = "/student/about" element = { < StudentLayout > < About /> </ StudentLayout > } />
9590 < Route path = "/student/assignment" element = { < StudentLayout > < AssignmentPage /> </ StudentLayout > } />
96-
97- { /*<Route path="/student/assignment_create" element={<StudentLayout><AssignmentCreate /></StudentLayout>} />*/ }
98- { /*<Route path="/student/settings" element={<StudentLayout><Settings /></StudentLayout>} />*/ }
99- { /*<Route path="/student/lessons" element={<StudentLayout><Lessons /></StudentLayout>} />*/ }
100- { /*<Route path="/student/resources" element={<StudentLayout><Resources /></StudentLayout>} />*/ }
101-
10291 < Route path = "/student/settings" element = { < StudentLayout > < Settings /> </ StudentLayout > } />
10392 < Route path = "/student/inbox" element = { < StudentLayout > < Inbox /> </ StudentLayout > } />
10493 < Route path = "/student/WhiteboardCanvas" element = { < StudentLayout > < WhiteboardCanvas /> </ StudentLayout > } />
10594 < Route path = "/student/LandingPage" element = { < StudentLayout > < LandingPage /> </ StudentLayout > } />
10695
96+
10797 { /* Tutor Routes with Layout */ }
10898 < Route path = "/tutor/view" element = { < StudentLayout > < TutorView /> </ StudentLayout > } />
10999 < Route path = "/tutor/calendar" element = { < StudentLayout > < Calendar /> </ StudentLayout > } />
@@ -123,11 +113,15 @@ function App() {
123113 < Route path = "/tutor/inbox" element = { < StudentLayout > < Inbox /> </ StudentLayout > } />
124114 < Route path = "/tutor/WhiteboardCanvas" element = { < StudentLayout > < WhiteboardCanvas /> </ StudentLayout > } />
125115 < Route path = "/tutor/LandingPage" element = { < StudentLayout > < LandingPage /> </ StudentLayout > } />
116+ < Route path = "/tutor/assignment_create" element = { < StudentLayout > < AssignmentCreate /> </ StudentLayout > } />
126117
127118 </ Routes >
119+
120+
128121 { ( location . pathname !== "/login" && location . pathname !== "/dateofbirth" && location . pathname !== "/SignUp" ) && < Footer /> }
129122 </ div >
130123 ) ;
131124}
132125
133- export default App ;
126+
127+ export default App ;
0 commit comments