mirror of
https://github.com/alexmickelson/canvasManagement.git
synced 2026-03-25 23:28:33 -06:00
more permissive breadcrumbs
This commit is contained in:
@@ -10,17 +10,15 @@ export const BreadCrumbs = () => {
|
|||||||
|
|
||||||
const pathSegments = pathname?.split("/").filter(Boolean) || [];
|
const pathSegments = pathname?.split("/").filter(Boolean) || [];
|
||||||
const isCourseRoute = pathSegments[0] === "course";
|
const isCourseRoute = pathSegments[0] === "course";
|
||||||
const isOnCoursePage = isCourseRoute && pathSegments.length === 2;
|
|
||||||
|
|
||||||
const courseName =
|
const courseName =
|
||||||
isCourseRoute && !isOnCoursePage && pathSegments[1]
|
isCourseRoute && pathSegments[1]
|
||||||
? decodeURIComponent(pathSegments[1])
|
? decodeURIComponent(pathSegments[1])
|
||||||
: null;
|
: null;
|
||||||
|
|
||||||
const isLectureRoute = isCourseRoute && pathSegments[2] === "lecture";
|
const isLectureRoute = isCourseRoute && pathSegments[2] === "lecture";
|
||||||
const isOnLecturePage = isLectureRoute && pathSegments.length === 4;
|
|
||||||
const lectureDate =
|
const lectureDate =
|
||||||
isLectureRoute && !isOnLecturePage && pathSegments[3]
|
isLectureRoute && pathSegments[3]
|
||||||
? decodeURIComponent(pathSegments[3])
|
? decodeURIComponent(pathSegments[3])
|
||||||
: null;
|
: null;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user