Skip to content

Commit

Permalink
when Courses is selected, a placeholder "Courses" is displayed
Browse files Browse the repository at this point in the history
  • Loading branch information
cadetjer committed Mar 14, 2024
1 parent 217a7fd commit 2ab5b67
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 1 deletion.
1 change: 1 addition & 0 deletions src/Kanbas/Courses/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ import { useState } from "react";
function Courses({ courses }: { courses: any[]; }) {
const { courseId } = useParams();
const course = courses.find((course) => course._id === courseId);
console.log(course);
const [kanbasNavToggle, setKanbasNavToggle] = useState(false);
const [courseNavToggle, setCourseNavToggle] = useState(false);

Expand Down
1 change: 1 addition & 0 deletions src/Kanbas/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ function Kanbas() {
updateCourse={updateCourse} />
} />
<Route path="Courses/:courseId/*" element={<Courses courses={courses} />} />
<Route path="Courses" element={<h1>Courses</h1>} />
<Route path="Calendar/*" element={<h1>Calendar</h1>} />
<Route path="Inbox/*" element={<h1>Inbox</h1>} />
<Route path="History/*" element={<h1>History</h1>} />
Expand Down
2 changes: 1 addition & 1 deletion src/Labs/a4/ReduxExamples/HelloRedux/index.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { useSelector, useDispatch } from "react-redux";
import { useSelector } from "react-redux";
import { LabState } from "../../../store";

function HelloRedux() {
Expand Down

0 comments on commit 2ab5b67

Please sign in to comment.