Skip to content

Commit

Permalink
added setSectionsItems as prop to SectionContainter
Browse files Browse the repository at this point in the history
  • Loading branch information
OlyaKorchan committed Oct 29, 2023
1 parent 87fb898 commit 5c59b56
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
3 changes: 2 additions & 1 deletion src/containers/course-section/CourseSectionContainer.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { useState, ChangeEvent, FC } from 'react'
import { useState, ChangeEvent, FC, Dispatch, SetStateAction } from 'react'
import { useTranslation } from 'react-i18next'
import { MenuItem } from '@mui/material'
import Box from '@mui/material/Box'
Expand All @@ -25,6 +25,7 @@ import {

interface SectionProps {
sectionData: CourseSection
setSectionsItems: Dispatch<SetStateAction<CourseSection[]>>
}

type openModalFunc = () => void
Expand Down
5 changes: 4 additions & 1 deletion src/containers/course-sections-list/CourseSectionsList.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,10 @@ const CourseSectionsList: FC<CourseSectionsListProps> = ({
{...provided.draggableProps}
{...provided.dragHandleProps}
>
<CourseSectionContainer sectionData={item} />
<CourseSectionContainer
sectionData={item}
setSectionsItems={setSectionsItems}
/>
</Box>
)}
</Draggable>
Expand Down

0 comments on commit 5c59b56

Please sign in to comment.