From d693992591acd6d7a16ad2091f2da0e25b75d99d Mon Sep 17 00:00:00 2001 From: mahdi Date: Tue, 31 May 2022 09:40:19 +0430 Subject: [PATCH] build(deps): update package.json, src/components/Accordion/AccordionDesign1/index.js, src/components/CardDesgin/CardDesign2/index.js and yarn.lock --- package.json | 1 + .../Accordion/AccordionDesign1/index.js | 47 +- yarn.lock | 16842 ++++++++-------- 3 files changed, 8328 insertions(+), 8562 deletions(-) diff --git a/package.json b/package.json index b7ab039..c52fd7d 100644 --- a/package.json +++ b/package.json @@ -36,6 +36,7 @@ "react-input-range": "^1.3.0", "react-leaflet": "^3.2.5", "react-leaflet-draw": "^0.19.8", + "react-monaco-editor": "^0.48.0", "react-multi-date-picker": "^3.3.0", "react-qr-code": "^2.0.7", "react-redux": "^7.2.6", diff --git a/src/components/Accordion/AccordionDesign1/index.js b/src/components/Accordion/AccordionDesign1/index.js index 604d5d6..9fdd181 100644 --- a/src/components/Accordion/AccordionDesign1/index.js +++ b/src/components/Accordion/AccordionDesign1/index.js @@ -3,9 +3,9 @@ import CircleInCircle from "../../MiniComponents/CircleInCircle"; import Button from "../../ButtonDesign/Button"; import { DragDropContext, Droppable, Draggable } from "react-beautiful-dnd"; -const AccordionDesign1 = ({ items, vod }) => { +const AccordionDesign1 = ({ courses, vod }) => { const [activeAccordion, setActiveAccordion] = useState(null); - const [accordions, updateAccordion] = useState(items); + const [accordions, updateAccordion] = useState(courses); function handleOnDragEnd(result) { if (!result.destination) return; @@ -19,18 +19,18 @@ const AccordionDesign1 = ({ items, vod }) => { return ( - + {(provided) => (
- {items.map((item, index) => ( + {courses.map((course, index) => ( {(provided) => ( @@ -47,13 +47,13 @@ const AccordionDesign1 = ({ items, vod }) => { {/* parent */}
setActiveAccordion( - activeAccordion === item ? null : item + activeAccordion === course ? null : course ) } > @@ -61,23 +61,23 @@ const AccordionDesign1 = ({ items, vod }) => { parentClassName={"bg-secondary w-4 h-4 "} childClassName={false} /> -

{item.title}

+

{course.title}

{vod && (

دقیقه: - {item.min} + {course.min}

ویدیو: - {item.video} + {course.video}

)} { />
{/* child */} - {activeAccordion === item && - item.subItems.map((subItem, i) => ( + {activeAccordion === course && + course.lessons.map((lesson, i) => (
{vod === !true && ( @@ -106,14 +106,14 @@ const AccordionDesign1 = ({ items, vod }) => {
-

{subItem.name}

+

{lesson.name}

{vod ? ( <>

دقیقه: - {item.min} + {course.min}