mirror of
https://github.com/rzmk/learnhouse.git
synced 2025-12-19 04:19:25 +00:00
feat: add breadcrumbs to course and activity page
This commit is contained in:
parent
bf94855d0c
commit
1fc791473e
4 changed files with 77 additions and 1 deletions
30
apps/web/components/Pages/Courses/CourseBreadcrumbs.tsx
Normal file
30
apps/web/components/Pages/Courses/CourseBreadcrumbs.tsx
Normal file
|
|
@ -0,0 +1,30 @@
|
|||
import { Book, ChevronRight } from 'lucide-react'
|
||||
import Link from 'next/link'
|
||||
import { getUriWithOrg } from '@services/config/config'
|
||||
import React from 'react'
|
||||
|
||||
interface CourseBreadcrumbsProps {
|
||||
course: any
|
||||
orgslug: string
|
||||
}
|
||||
|
||||
export default function CourseBreadcrumbs({ course, orgslug }: CourseBreadcrumbsProps) {
|
||||
const cleanCourseUuid = course.course_uuid?.replace('course_', '')
|
||||
|
||||
return (
|
||||
<div className="text-gray-400 tracking-tight font-medium text-sm flex space-x-1 pt-2">
|
||||
<div className="flex items-center space-x-1">
|
||||
<div className="flex space-x-2 items-center">
|
||||
<Book className="text-gray" size={14} />
|
||||
<Link href={getUriWithOrg(orgslug, '') + `/courses`}>
|
||||
Courses
|
||||
</Link>
|
||||
</div>
|
||||
<ChevronRight size={14} />
|
||||
<div className="first-letter:uppercase">
|
||||
{course.name}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
)
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue