summaryrefslogtreecommitdiff
path: root/frontend/src/redux
diff options
context:
space:
mode:
authorVictor Chabbert <chabbertvi@eisti.eu>2017-05-22 22:47:20 +0200
committerVictor Chabbert <chabbertvi@eisti.eu>2017-05-22 22:47:20 +0200
commit3ff3b72f31b4a2647366c17dd2bbba0a8aae58e9 (patch)
tree22cd8ad06323babb4d625cb1e4aeec8834081521 /frontend/src/redux
parentRevert to version number for flow-typed (diff)
downloadseven-wonders-3ff3b72f31b4a2647366c17dd2bbba0a8aae58e9.tar.gz
seven-wonders-3ff3b72f31b4a2647366c17dd2bbba0a8aae58e9.tar.bz2
seven-wonders-3ff3b72f31b4a2647366c17dd2bbba0a8aae58e9.zip
Move to prettier-eslint for better configuration
Diffstat (limited to 'frontend/src/redux')
-rw-r--r--frontend/src/redux/errors.js5
-rw-r--r--frontend/src/redux/players.js6
2 files changed, 8 insertions, 3 deletions
diff --git a/frontend/src/redux/errors.js b/frontend/src/redux/errors.js
index ec1e30b6..fdc2242d 100644
--- a/frontend/src/redux/errors.js
+++ b/frontend/src/redux/errors.js
@@ -19,7 +19,10 @@ const initialState = Immutable.from({
export default (state = initialState, action) => {
switch (action.type) {
case types.ERROR_RECEIVED_ON_WS:
- let error = Object.assign({ id: state.nextId, timestamp: new Date() }, action.error);
+ let error = Object.assign(
+ { id: state.nextId, timestamp: new Date() },
+ action.error
+ );
let newState = state.set('nextId', state.nextId + 1);
newState = addErrorToHistory(newState, error);
return newState;
diff --git a/frontend/src/redux/players.js b/frontend/src/redux/players.js
index b11e920f..db9f1416 100644
--- a/frontend/src/redux/players.js
+++ b/frontend/src/redux/players.js
@@ -39,6 +39,8 @@ export default (state = initialState, action) => {
}
};
-export const getCurrentPlayer = state => state.players.all && state.players.all[state.players.current];
+export const getCurrentPlayer = state =>
+ state.players.all && state.players.all[state.players.current];
export const getPlayer = (state, username) => state.players.all[username];
-export const getPlayers = (state, usernames) => usernames.map(u => getPlayer(state, u));
+export const getPlayers = (state, usernames) =>
+ usernames.map(u => getPlayer(state, u));
bgstack15