From 2609590cd377ed1e77e75d2729261ecfb3ad7bd0 Mon Sep 17 00:00:00 2001 From: mahdi andalib Date: Tue, 25 Jan 2022 12:07:05 +0330 Subject: [PATCH] course component added --- src/App.js | 10 ++++----- src/components/CourseChapter/index.js | 29 +++++++++++---------------- 2 files changed, 17 insertions(+), 22 deletions(-) diff --git a/src/App.js b/src/App.js index 15939d6..4a94e49 100644 --- a/src/App.js +++ b/src/App.js @@ -63,12 +63,12 @@ function App() { {/* */} {/* */} {/* */} - + {/* */} {/* */} - {/* */} - {/* */} - {/* */} - {/* */} + + + + diff --git a/src/components/CourseChapter/index.js b/src/components/CourseChapter/index.js index 983d2d4..5a73748 100644 --- a/src/components/CourseChapter/index.js +++ b/src/components/CourseChapter/index.js @@ -22,31 +22,26 @@ const CourseChapter = ({ chapters }) => { {/* divider */}
{/* course title */} - {chapters.map((chapter, i) => ( + {chapters.map((chapter, index) => (

{chapter.title}

{chapter.duration}
{/* course lessons */} - {chapter.lessons.map((lesson, index) => ( - + {chapter.lessons.map((lesson, i) => (
{/* right div dot dot */}
+
+
-
{/* left div content */} @@ -99,25 +94,25 @@ CourseChapter.defaultProps = { title: "آیا گوگل از ما دزدی میکند؟", duration: "14:30", play: "پخش", - // step : true, + passed : true, }, { title: "چگونگی ساخت نیروگاه های برقی", duration: "22:31", play: "در حال پخش", - // step : false, + passed : true, }, { title: "آیا از اینترنت می توان درآمد داشت؟", duration: "10:09", play: "نمایش", - // step : false, + passed : false, }, { title: "زمین سبز و آسمان آبی", duration: "56:09", play: "نمایش", - // step : false, + passed : false, }, ], },