Last active
February 29, 2020 11:12
-
-
Save Djuki/af8140ab21f3bef0e300deaf73c31fff to your computer and use it in GitHub Desktop.
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
import React from 'react'; | |
import { SUCCESS_FETCH_BRANCHES } from '../actions'; | |
const repositories = (state = {}, action = []) => { | |
switch (action.type) { | |
case SUCCESS_FETCH_BRANCHES: { | |
return { ...state, branches: state.branches.concat(action.branches), branchesNextPage: action.nextPage }; | |
} | |
default: { | |
return state; | |
} | |
} | |
return state; | |
}; | |
export default repositories; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment