@@ -14,24 +14,13 @@ import {
1414 formatFilterCombo ,
1515} from '../../views/sis/course-search/lib/format-filter-combo'
1616
17- const UPDATE_COURSE_FILTERS = 'courses/UPDATE_COURSE_FILTERS'
1817const LOAD_CACHED_COURSES = 'courses/LOAD_CACHED_COURSES'
1918const COURSES_LOADED = 'courses/COURSES_LOADED'
2019
2120type Dispatch < A : Action > = ( action : A | Promise < A > | ThunkAction < A > ) => any
2221type GetState = ( ) => ReduxState
2322type ThunkAction < A : Action > = ( dispatch : Dispatch < A > , getState : GetState ) => any
2423
25- type UpdateCourseFiltersAction = { |
26- type : 'courses/UPDATE_COURSE_FILTERS' ,
27- payload : Array < FilterType > ,
28- | }
29- export function updateCourseFilters (
30- filters : FilterType [ ] ,
31- ) : UpdateCourseFiltersAction {
32- return { type : UPDATE_COURSE_FILTERS , payload : filters }
33- }
34-
3524const UPDATE_RECENT_FILTERS = 'courses/UPDATE_RECENT_FILTERS'
3625
3726type UpdateRecentFiltersAction = { |
@@ -151,7 +140,6 @@ export function updateRecentSearches(
151140}
152141
153142type Action =
154- | UpdateCourseFiltersAction
155143 | LoadCachedCoursesAction
156144 | CoursesLoadedAction
157145 | UpdateRecentSearchesAction
@@ -160,7 +148,6 @@ type Action =
160148 | LoadRecentFiltersAction
161149
162150export type State = { |
163- filters : Array < FilterType > ,
164151 allCourses : Array < CourseType > ,
165152 readyState : 'not-loaded' | 'ready' ,
166153 validGEs : string [ ] ,
@@ -169,7 +156,6 @@ export type State = {|
169156| }
170157
171158const initialState = {
172- filters : [ ] ,
173159 allCourses : [ ] ,
174160 readyState : 'not-loaded' ,
175161 validGEs : [ ] ,
@@ -179,9 +165,6 @@ const initialState = {
179165
180166export function courses ( state : State = initialState , action : Action ) {
181167 switch ( action . type ) {
182- case UPDATE_COURSE_FILTERS :
183- return { ...state , filters : action . payload }
184-
185168 case LOAD_RECENT_FILTERS :
186169 return { ...state , recentFilters : action . payload }
187170
0 commit comments