File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -27,6 +27,7 @@ export const SectionSidebar = () => {
2727 sections,
2828 updateSectionOrderByIndex,
2929 openDeleteModal,
30+ openUnlinkModal,
3031 } = useCourseAuthoringContext ( ) ;
3132
3233 const handlePublish = ( ) => {
@@ -62,7 +63,7 @@ export const SectionSidebar = () => {
6263 onClickDuplicate : handleDuplicateSectionSubmit ,
6364 onClickMoveUp : ( ) => handleMove ( - 1 ) ,
6465 onClickMoveDown : ( ) => handleMove ( 1 ) ,
65- onClickUnlink : ( ) => { } ,
66+ onClickUnlink : ( ) => openUnlinkModal ( { value : sectionData , sectionId } ) ,
6667 onClickDelete : openDeleteModal ,
6768 onClickViewLibrary : ( ) => { } ,
6869 } }
Original file line number Diff line number Diff line change @@ -34,6 +34,7 @@ export const SubsectionSidebar = () => {
3434 sections,
3535 updateSubsectionOrderByIndex,
3636 openDeleteModal,
37+ openUnlinkModal,
3738 } = useCourseAuthoringContext ( ) ;
3839
3940 const handlePublish = ( ) => {
@@ -104,7 +105,10 @@ export const SubsectionSidebar = () => {
104105 onClickDuplicate : handleDuplicateSubsectionSubmit ,
105106 onClickMoveUp : ( ) => handleMove ( - 1 ) ,
106107 onClickMoveDown : ( ) => handleMove ( 1 ) ,
107- onClickUnlink : ( ) => { } ,
108+ onClickUnlink : ( ) => openUnlinkModal ( {
109+ value : subsectionData ,
110+ sectionId : selectedContainerState ?. sectionId ,
111+ } ) ,
108112 onClickDelete : openDeleteModal ,
109113 onClickViewLibrary : ( ) => { } ,
110114 } }
Original file line number Diff line number Diff line change @@ -42,6 +42,7 @@ export const UnitSidebar = () => {
4242 sections,
4343 updateUnitOrderByIndex,
4444 openDeleteModal,
45+ openUnlinkModal,
4546 } = useCourseAuthoringContext ( ) ;
4647
4748 const handlePublish = ( ) => {
@@ -128,7 +129,11 @@ export const UnitSidebar = () => {
128129 onClickDuplicate : handleDuplicateUnitSubmit ,
129130 onClickMoveUp : ( ) => handleMove ( - 1 ) ,
130131 onClickMoveDown : ( ) => handleMove ( 1 ) ,
131- onClickUnlink : ( ) => { } ,
132+ onClickUnlink : ( ) => openUnlinkModal ( {
133+ value : unitData ,
134+ sectionId : selectedContainerState ?. sectionId ,
135+ subsectionId : selectedContainerState ?. subsectionId ,
136+ } ) ,
132137 onClickDelete : openDeleteModal ,
133138 onClickViewLibrary : ( ) => { } ,
134139 onClickCopy : ( ) => { } ,
You can’t perform that action at this time.
0 commit comments