Skip to content

Commit 503470b

Browse files
Merge pull request #167 from UNLV-CS472-672/login-prompt-questions
7th PR: Add Role-Based Questionnaire Flow Post-Login
2 parents 59da423 + 177d986 commit 503470b

File tree

8 files changed

+590
-55
lines changed

8 files changed

+590
-55
lines changed

frontend/package-lock.json

Lines changed: 10 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

frontend/package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
"axios": "^1.8.4",
1515
"bootstrap": "^5.3.3",
1616
"bootstrap-icons": "^1.11.3",
17+
"canvas-confetti": "^1.9.3",
1718
"emoji-picker-react": "^4.12.2",
1819
"react": "^19.0.0",
1920
"react-calendar": "^5.1.0",

frontend/src/App.jsx

Lines changed: 16 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ import Header from "./Components/Header.jsx";
44
import Footer from "./Components/Footer.jsx";
55
import StudentLayout from "./Components/StudentLayout.jsx";
66

7+
78
// Components
89
import Home from "./components/Home.jsx";
910
import About from "./components/About.jsx";
@@ -25,29 +26,29 @@ import Calendar from "./Components/Calendar.jsx";
2526
import Inbox from "./Components/Inbox.jsx";
2627
import TutorView from "./Components/TutorView.jsx";
2728
import AssignmentPage from "./Components/AssignmentPage.jsx";
28-
29-
import AssignmentCreate from "./Components/AssignmentCreate.jsx";
30-
3129
import WhiteboardCanvas from "./Components/WhiteboardCanvas.jsx";
3230
import LandingPage from "./Components/LandingPage.jsx";
33-
3431
import Settings from "./Components/Settings.jsx";
35-
32+
import Questionnaire from "./Components/Questionnaire.jsx";
33+
import AssignmentCreate from "./Components/AssignmentCreate.jsx";
3634

3735

3836
function 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

Comments
 (0)