diff --git a/apps/lms/app/(course)/courses/[courseId]/chapters/[chapterId]/_components/video-player.tsx b/apps/lms/app/(course)/courses/[courseId]/chapters/[chapterId]/_components/video-player.tsx index d6f3bf8..77cda42 100644 --- a/apps/lms/app/(course)/courses/[courseId]/chapters/[chapterId]/_components/video-player.tsx +++ b/apps/lms/app/(course)/courses/[courseId]/chapters/[chapterId]/_components/video-player.tsx @@ -69,7 +69,7 @@ export const VideoPlayer = ({ {isLocked && (
This chapter is locked
+Please enroll to enjoy this course.
{attachment.name}
+ + ))} +{attachment.name}
- - ))} -
diff --git a/apps/lms/components/container.tsx b/apps/lms/components/container.tsx
new file mode 100644
index 0000000..9d9d8b2
--- /dev/null
+++ b/apps/lms/components/container.tsx
@@ -0,0 +1,22 @@
+import clsx from 'clsx';
+import { ElementType, ReactNode } from 'react';
+
+interface ContainerProps {
+ as?: ElementType;
+ className?: string;
+ children?: ReactNode;
+}
+
+export function Container({
+ as: Component = 'div',
+ className,
+ children,
+}: ContainerProps) {
+ return (
+
+ {description} +
{progress !== null ? (+
{formatPrice(price) === '$0' ? 'Free' : formatPrice(price)}
)} diff --git a/apps/lms/components/courses-list.tsx b/apps/lms/components/courses-list.tsx index 74f3aee..02a87e9 100644 --- a/apps/lms/components/courses-list.tsx +++ b/apps/lms/components/courses-list.tsx @@ -21,6 +21,7 @@ export const CoursesList = ({ items }: CoursesListProps) => { key={item.id} id={item.id} title={item.title} + description={item.description!} imageUrl={item.imageUrl!} chaptersLength={item.chapters.length} price={item.price!}