@@ -8,7 +8,7 @@ import { Button, Spinner } from '@edx/paragon';
8
8
9
9
import SearchInfo from '../../components/SearchInfo' ;
10
10
import { RequestStatus } from '../../data/constants' ;
11
- import { selectConfigLoadingStatus , selectLearnersTabEnabled } from '../data/selectors' ;
11
+ import { selectConfigLoadingStatus } from '../data/selectors' ;
12
12
import NoResults from '../posts/NoResults' ;
13
13
import {
14
14
learnersLoadingStatus ,
@@ -31,18 +31,15 @@ const LearnersView = () => {
31
31
const loadingStatus = useSelector ( learnersLoadingStatus ( ) ) ;
32
32
const usernameSearch = useSelector ( selectUsernameSearch ( ) ) ;
33
33
const courseConfigLoadingStatus = useSelector ( selectConfigLoadingStatus ) ;
34
- const learnersTabEnabled = useSelector ( selectLearnersTabEnabled ) ;
35
34
const learners = useSelector ( selectAllLearners ) ;
36
35
37
36
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 } ) ) ;
44
41
}
45
- } , [ courseId , orderBy , learnersTabEnabled , usernameSearch ] ) ;
42
+ } , [ courseId , orderBy , usernameSearch ] ) ;
46
43
47
44
const loadPage = useCallback ( async ( ) => {
48
45
if ( nextPage ) {
@@ -60,12 +57,12 @@ const LearnersView = () => {
60
57
61
58
const renderLearnersList = useMemo ( ( ) => (
62
59
(
63
- courseConfigLoadingStatus === RequestStatus . SUCCESSFUL && learnersTabEnabled && learners . map ( ( learner ) => (
60
+ courseConfigLoadingStatus === RequestStatus . SUCCESSFUL && learners . map ( ( learner ) => (
64
61
< LearnerCard learner = { learner } key = { learner . username } />
65
62
) )
66
63
// eslint-disable-next-line react/jsx-no-useless-fragment
67
64
) || < > </ >
68
- ) , [ courseConfigLoadingStatus , learnersTabEnabled , learners ] ) ;
65
+ ) , [ courseConfigLoadingStatus , learners ] ) ;
69
66
70
67
return (
71
68
< div className = "d-flex flex-column border-right border-light-400" >
0 commit comments