summaryrefslogtreecommitdiff
path: root/frontend/src/reducers.ts
diff options
context:
space:
mode:
Diffstat (limited to 'frontend/src/reducers.ts')
-rw-r--r--frontend/src/reducers.ts12
1 files changed, 9 insertions, 3 deletions
diff --git a/frontend/src/reducers.ts b/frontend/src/reducers.ts
index 679bffe1..f885f642 100644
--- a/frontend/src/reducers.ts
+++ b/frontend/src/reducers.ts
@@ -1,10 +1,9 @@
-// @flow
import { routerReducer } from 'react-router-redux';
import { combineReducers } from 'redux';
import { ApiPlayer } from './api/model';
-import { CurrentGameState } from './redux/currentGame';
+import { CurrentGameState, EMPTY_CURRENT_GAME } from './redux/currentGame';
import { createCurrentGameReducer } from './redux/currentGame';
-import { GamesState } from './redux/games';
+import { EMPTY_GAMES, GamesState } from './redux/games';
import { createGamesReducer } from './redux/games';
import { currentUserReducer } from './redux/user';
@@ -15,6 +14,13 @@ export type GlobalState = {
routing: any;
}
+export const INITIAL_STATE: GlobalState = {
+ currentGame: EMPTY_CURRENT_GAME,
+ currentUser: null,
+ games: EMPTY_GAMES,
+ routing: null,
+};
+
export function createReducer() {
return combineReducers({
currentGame: createCurrentGameReducer(),
bgstack15