-
-
Save LukeSmetham/9cd5ce24f6418d72f717fa66ab9a0103 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 { SET_UNREAD_COUNT } from './types'; | |
const init = { | |
unread: 0, | |
}; | |
export default (state = init, action) => { | |
switch (action.type) { | |
case SET_UNREAD_COUNT: | |
return { ...state, unread: action.count }; | |
default: | |
return state; | |
} | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment