@@ -5,31 +5,21 @@ import {
55 ArrowDropDown as ArrowDropDownIcon ,
66 ChevronRight as ChevronRightIcon ,
77} from '@openedx/paragon/icons' ;
8- import { getConfig } from '@edx/frontend-platform' ;
9-
10- import { useWaffleFlags } from '../../data/apiHooks' ;
118import { getCourseSectionVertical } from '../data/selectors' ;
129import { adoptCourseSectionUrl , subsectionFirstUnitEditUrl } from '../utils' ;
1310
1411const Breadcrumbs = ( { courseId, parentUnitId } : { courseId : string ; parentUnitId : string ; } ) => {
1512 const { ancestorXblocks = [ ] } = useSelector ( getCourseSectionVertical ) ;
16- const waffleFlags = useWaffleFlags ( courseId ) ;
17-
18- const getPathToCourseOutlinePage = ( url ) => ( waffleFlags . useNewCourseOutlinePage
19- ? url :
20- `${ getConfig ( ) . STUDIO_BASE_URL } ${ url } ` ) ;
2113
22- const getPathToCourseUnitPage = ( url ) => ( waffleFlags . useNewUnitPage
23- ? adoptCourseSectionUrl ( { url, courseId, parentUnitId } )
24- : `${ getConfig ( ) . STUDIO_BASE_URL } ${ url } ` ) ;
14+ const getPathToCourseUnitPage = ( url ) => adoptCourseSectionUrl ( { url, courseId, parentUnitId } ) ;
2515
2616 // based on the level of breadcrumbs the url will differ
2717 // at the subsection level it should navigate to the first unit if available
2818 // if no unit then navigate to the subsection outline
2919 function getPathToCoursePage ( index , url , usageKey : string ) {
3020 let navUrl : string ;
3121 if ( index === 0 ) {
32- navUrl = getPathToCourseOutlinePage ( url ) ;
22+ navUrl = url ;
3323 } else if ( index === 1 ) {
3424 navUrl = subsectionFirstUnitEditUrl ( { courseId, subsectionId : usageKey } ) ;
3525 } else {
0 commit comments