-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Migsar Navarro
committed
May 30, 2019
1 parent
272a759
commit 116fcc0
Showing
5 changed files
with
36 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
import { createAction } from 'vizzuality-redux-tools'; | ||
|
||
export const setSearch = createAction('SEARCH/setSearch'); | ||
export const setSearchTerm = createAction('SEARCH/setSearchTerm'); | ||
export const setSearchResults = createAction('SEARCH/setSearchResults'); | ||
|
||
export default { | ||
setSearch, | ||
setSearchTerm, | ||
setSearchResults | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
import * as actions from './actions'; | ||
import * as reducers from './reducers'; | ||
import initialState from './initial-state'; | ||
|
||
export { actions, initialState, reducers }; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
export default { | ||
term: '', | ||
results: [] | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
import * as actions from './actions'; | ||
|
||
const { | ||
setSearch, | ||
setSearchTerm, | ||
setSearchResults | ||
} = actions; | ||
|
||
export default { | ||
[setSearch]: (state, { payload }) => ({ ...state, ...payload }), | ||
[setSearchTerm]: (state, { payload }) => ({ ...state, term: payload }), | ||
[setSearchResults]: (state, { payload }) => ({ ...state, results: payload }) | ||
}; |