@@ -8,7 +8,7 @@ import { Button, Spinner } from '@edx/paragon';
88
99import SearchInfo from '../../components/SearchInfo' ;
1010import { RequestStatus } from '../../data/constants' ;
11- import { selectConfigLoadingStatus , selectLearnersTabEnabled } from '../data/selectors' ;
11+ import { selectConfigLoadingStatus } from '../data/selectors' ;
1212import NoResults from '../posts/NoResults' ;
1313import {
1414 learnersLoadingStatus ,
@@ -31,18 +31,15 @@ const LearnersView = () => {
3131 const loadingStatus = useSelector ( learnersLoadingStatus ( ) ) ;
3232 const usernameSearch = useSelector ( selectUsernameSearch ( ) ) ;
3333 const courseConfigLoadingStatus = useSelector ( selectConfigLoadingStatus ) ;
34- const learnersTabEnabled = useSelector ( selectLearnersTabEnabled ) ;
3534 const learners = useSelector ( selectAllLearners ) ;
3635
3736 useEffect ( ( ) => {
38- if ( learnersTabEnabled ) {
39- if ( usernameSearch ) {
40- dispatch ( fetchLearners ( courseId , { orderBy, usernameSearch } ) ) ;
41- } else {
42- dispatch ( fetchLearners ( courseId , { orderBy } ) ) ;
43- }
37+ if ( usernameSearch ) {
38+ dispatch ( fetchLearners ( courseId , { orderBy, usernameSearch } ) ) ;
39+ } else {
40+ dispatch ( fetchLearners ( courseId , { orderBy } ) ) ;
4441 }
45- } , [ courseId , orderBy , learnersTabEnabled , usernameSearch ] ) ;
42+ } , [ courseId , orderBy , usernameSearch ] ) ;
4643
4744 const loadPage = useCallback ( async ( ) => {
4845 if ( nextPage ) {
@@ -60,12 +57,12 @@ const LearnersView = () => {
6057
6158 const renderLearnersList = useMemo ( ( ) => (
6259 (
63- courseConfigLoadingStatus === RequestStatus . SUCCESSFUL && learnersTabEnabled && learners . map ( ( learner ) => (
60+ courseConfigLoadingStatus === RequestStatus . SUCCESSFUL && learners . map ( ( learner ) => (
6461 < LearnerCard learner = { learner } key = { learner . username } />
6562 ) )
6663 // eslint-disable-next-line react/jsx-no-useless-fragment
6764 ) || < > </ >
68- ) , [ courseConfigLoadingStatus , learnersTabEnabled , learners ] ) ;
65+ ) , [ courseConfigLoadingStatus , learners ] ) ;
6966
7067 return (
7168 < div className = "d-flex flex-column border-right border-light-400" >
0 commit comments