diff --git a/app/features/hidden-list-component.tsx b/app/features/hidden-list-component.tsx index 4160e4f..af67316 100644 --- a/app/features/hidden-list-component.tsx +++ b/app/features/hidden-list-component.tsx @@ -6,16 +6,17 @@ import type { ThunkDispatch } from '@reduxjs/toolkit' import toast from 'react-hot-toast' import { removeBlock } from '~/redux/slices/course' import { delay } from '~/widgets/helpers/delay' -import { ToasterWithOptions } from '~/shared' +import { ToasterWithOptions, TransparentButton } from '~/shared' interface Props { header: string index: number id: string className?: string + items: any } -export function HiddenListComponent({ header, index, className, id }: Props) { +export function HiddenListComponent({ header, index, className, id, items }: Props) { const [isVisibly, setVisibly] = useState(false) const dispatch = useDispatch>() @@ -80,13 +81,21 @@ export function HiddenListComponent({ header, index, className, id }: Props) {
-

- ergkmeriojgierjgioerjgiouerghjreuhgou -

+ {items.map((item: any, index: number) => ( +
+

{item.elementName}

+
+ ))} + +
+ Додати урок + + Додати тест +
diff --git a/app/routes/edit-course.$course.tsx b/app/routes/edit-course.$course.tsx index e325224..eba65bb 100644 --- a/app/routes/edit-course.$course.tsx +++ b/app/routes/edit-course.$course.tsx @@ -7,7 +7,12 @@ import toast from 'react-hot-toast' import { useDispatch, useSelector } from 'react-redux' import { HiddenListComponent } from '~/features' import { fetchCourse, updateBlock } from '~/redux/slices/course' -import { Header3, Header4, ToasterWithOptions, TransparentButton } from '~/shared' +import { + Header3, + Header4, + ToasterWithOptions, + TransparentButton, +} from '~/shared' import { delay } from '~/widgets/helpers/delay' export default function Course() { @@ -119,8 +124,9 @@ export default function Course() { {/* ts-ignore */} {course.data.courseElementsList.map( (element: any, index: number) => ( -
+