edit-course-content.js 572 B

1234567891011121314
  1. import { memo } from 'react'
  2. import CourseStructure from './course-structure'
  3. /**
  4. * Course modules in edit mode. The add / edit / delete / reorder flow (the
  5. * bx_courses_cnt_structure_manage grid forms in the bottom sheet) lives in
  6. * course-structure.js behind UNA's `isEditable` flag, so this renders it with the
  7. * same payload ({ items, entry_id, isEditable }), editable unless UNA says no.
  8. */
  9. function EditCourseContent({ data }) {
  10. return <CourseStructure data={{ ...data, isEditable: data?.isEditable ?? true }} />
  11. }
  12. export default memo(EditCourseContent);