Skip to content

Commit e53b1b8

Browse files
committed
remove course filters from redux
1 parent b8a3332 commit e53b1b8

File tree

1 file changed

+0
-17
lines changed

1 file changed

+0
-17
lines changed

source/flux/parts/courses.js

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -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'
1817
const LOAD_CACHED_COURSES = 'courses/LOAD_CACHED_COURSES'
1918
const COURSES_LOADED = 'courses/COURSES_LOADED'
2019

2120
type Dispatch<A: Action> = (action: A | Promise<A> | ThunkAction<A>) => any
2221
type GetState = () => ReduxState
2322
type 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-
3524
const UPDATE_RECENT_FILTERS = 'courses/UPDATE_RECENT_FILTERS'
3625

3726
type UpdateRecentFiltersAction = {|
@@ -151,7 +140,6 @@ export function updateRecentSearches(
151140
}
152141

153142
type Action =
154-
| UpdateCourseFiltersAction
155143
| LoadCachedCoursesAction
156144
| CoursesLoadedAction
157145
| UpdateRecentSearchesAction
@@ -160,7 +148,6 @@ type Action =
160148
| LoadRecentFiltersAction
161149

162150
export 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

171158
const initialState = {
172-
filters: [],
173159
allCourses: [],
174160
readyState: 'not-loaded',
175161
validGEs: [],
@@ -179,9 +165,6 @@ const initialState = {
179165

180166
export 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

Comments
 (0)