diff --git a/src/app/dashboard/courses/[id]/page.tsx b/src/app/dashboard/courses/[id]/page.tsx index b640f77..e4ed0d4 100644 --- a/src/app/dashboard/courses/[id]/page.tsx +++ b/src/app/dashboard/courses/[id]/page.tsx @@ -6,11 +6,22 @@ import SummaryTabContent from "@/components/dashboard/SummaryTabContent"; import ResourcesTabContent from "@/components/dashboard/ResourcesTabContent"; import TaskTabContent from "@/components/dashboard/TaskTabContent"; import CourseContentTrackerSidebar from "@/components/dashboard/CourseContentTrackerSidebar"; -import CourseLearningHeader from "@/components/dashboard/CourseLearningHeader"; +import CourseVideoPlayer from "@/components/dashboard/CourseVideoPlayer"; +import { Checkbox } from "@/components/ui/Checkbox"; import image1 from "../../../../../public/Image (1).png"; type TabId = "overview" | "resources" | "tasks" | "summary"; +const LESSONS = [ + { id: 1, title: "Lesson 1: Intro to Digital Technology", duration: "5 min" }, + { id: 2, title: "Lesson 2: Blockchain Basics", duration: "5 min" }, + { id: 3, title: "Lesson 3: Smart Contracts", duration: "5 min" }, + { id: 4, title: "Lesson 4: DeFi Fundamentals", duration: "5 min" }, + { id: 5, title: "Lesson 5: Web3 Wallets", duration: "5 min" }, + { id: 6, title: "Lesson 6: dApp Development", duration: "5 min" }, + { id: 7, title: "Lesson 7: Token Standards", duration: "5 min" }, +]; + interface Params { id: string; } @@ -106,6 +117,8 @@ const COURSE_DATA: Record< export default function CourseDetailsPage({ params }: { params: Params }) { const courseData = COURSE_DATA[params.id]; const [activeTab, setActiveTab] = useState("overview"); + const [currentLesson, setCurrentLesson] = useState(0); + const [completed, setCompleted] = useState(false); if (!courseData) { return ( @@ -115,28 +128,49 @@ export default function CourseDetailsPage({ params }: { params: Params }) { ); } + const handlePrevious = () => + setCurrentLesson((prev) => Math.max(0, prev - 1)); + const handleNext = () => + setCurrentLesson((prev) => Math.min(LESSONS.length - 1, prev + 1)); + return (
+ {/* Breadcrumb */} +
+ {courseData.title} + | + + {LESSONS[currentLesson].title} + +
+
+ {/* Left: video + tabs */}
- -
- {courseData.title} + setCompleted(Boolean(val))} + shape="square" + className="border-white/30 data-[state=checked]:bg-purple-600 data-[state=checked]:border-purple-600" /> -
+ Completed + -
+ {/* Tabs */} +
{[ { id: "overview" as const, label: "Overview" }, { id: "resources" as const, label: "Resources" }, - { id: "tasks" as const, label: "Tasks" }, + { id: "tasks" as const, label: "Task" }, { id: "summary" as const, label: "Summary" }, ].map((tab) => (
+ {/* Right: tutor + content tracker */}
- + ({ + id: l.id, + title: l.title, + duration: l.duration, + }))} + tutorInfo={{ + name: "Satoshi Nakamoto", + role: "Front-End Developer", + avatar: "/avatarPlaceholder1.jpg", + }} + />
diff --git a/src/components/dashboard/CourseVideoPlayer.tsx b/src/components/dashboard/CourseVideoPlayer.tsx new file mode 100644 index 0000000..17ca118 --- /dev/null +++ b/src/components/dashboard/CourseVideoPlayer.tsx @@ -0,0 +1,76 @@ +"use client"; + +import React, { useState } from "react"; +import { Play, SkipBack, SkipForward } from "lucide-react"; + +interface CourseVideoPlayerProps { + thumbnailSrc: string; + thumbnailAlt?: string; + onPrevious?: () => void; + onNext?: () => void; + onPlay?: () => void; +} + +export default function CourseVideoPlayer({ + thumbnailSrc, + thumbnailAlt = "Course video thumbnail", + onPrevious, + onNext, + onPlay, +}: CourseVideoPlayerProps) { + const [isPlayHovered, setIsPlayHovered] = useState(false); + + return ( +
+ {/* Thumbnail */} + {thumbnailAlt} + + {/* Dark overlay */} +
+ + {/* Side nav: Previous */} + + + {/* Center play button */} + + + {/* Side nav: Next */} + +
+ ); +}