diff options
Diffstat (limited to 'frontend/src/containers/GameBrowser/reducer.js')
-rw-r--r-- | frontend/src/containers/GameBrowser/reducer.js | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/frontend/src/containers/GameBrowser/reducer.js b/frontend/src/containers/GameBrowser/reducer.js new file mode 100644 index 00000000..4fb3390a --- /dev/null +++ b/frontend/src/containers/GameBrowser/reducer.js @@ -0,0 +1,13 @@ +import { Map } from 'immutable' +import { NEW_GAME } from './constants' + +const initialState = Map({}) + +export default function reducer(state = initialState, action) { + switch (action.type) { + case NEW_GAME: + return state.set(action.game.get('id'), action.game) + default: + return state + } +} |