diff options
| author | Kamran Ahmed <kamranahmed.se@gmail.com> | 2018-08-25 22:28:46 +0500 |
|---|---|---|
| committer | Kamran Ahmed <kamranahmed.se@gmail.com> | 2018-08-25 22:28:46 +0500 |
| commit | 3cb44125e3aaa8927b6216d5c311746f9a14a44e (patch) | |
| tree | 60e81f3df3ed4d85435edef8d307abac4bff1e0b /src/redux/github/reducer.js | |
| parent | Change colors (diff) | |
| download | githunt-3cb44125e3aaa8927b6216d5c311746f9a14a44e.tar.gz | |
Filter preparation for trending repositories
Diffstat (limited to 'src/redux/github/reducer.js')
| -rw-r--r-- | src/redux/github/reducer.js | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/src/redux/github/reducer.js b/src/redux/github/reducer.js index 66a11b5..8f6c037 100644 --- a/src/redux/github/reducer.js +++ b/src/redux/github/reducer.js @@ -2,9 +2,14 @@ import { FETCH_TRENDING_FAILED, FETCH_TRENDING_SUCCESS, PROCESS_FETCH_TRENDING, export const initialState = { processing: false, - error: null, + // Array of objects with the below format + // [ + // { start: '', end: '', data: [] }, + // { start: '', end: '', data: [] } + // ] + repositories: [], filters: {}, - data: [], + error: null, }; export default function reducer(state = initialState, action) { @@ -18,7 +23,7 @@ export default function reducer(state = initialState, action) { case FETCH_TRENDING_SUCCESS: return { ...state, - data: action.payload, + repositories: action.payload, processing: false, error: null }; |
