summaryrefslogtreecommitdiff
path: root/frontend/src/redux
diff options
context:
space:
mode:
authorjbion <joffrey.bion@amadeus.com>2019-05-07 10:21:51 +0200
committerjbion <joffrey.bion@amadeus.com>2019-05-07 10:21:51 +0200
commitdd8b7403fb1cdfba278b1cb097adea1b5bed1410 (patch)
tree4230af60a00ad344b6583d7a418c51bad9180801 /frontend/src/redux
parentFix yarn.lock private URL (diff)
downloadseven-wonders-dd8b7403fb1cdfba278b1cb097adea1b5bed1410.tar.gz
seven-wonders-dd8b7403fb1cdfba278b1cb097adea1b5bed1410.tar.bz2
seven-wonders-dd8b7403fb1cdfba278b1cb097adea1b5bed1410.zip
Convert index.js to TypeScript
Diffstat (limited to 'frontend/src/redux')
-rw-r--r--frontend/src/redux/currentGame.ts5
-rw-r--r--frontend/src/redux/games.ts5
2 files changed, 10 insertions, 0 deletions
diff --git a/frontend/src/redux/currentGame.ts b/frontend/src/redux/currentGame.ts
index 76006677..5e015d60 100644
--- a/frontend/src/redux/currentGame.ts
+++ b/frontend/src/redux/currentGame.ts
@@ -9,6 +9,11 @@ export type CurrentGameState = {
table: ApiTable | null;
}
+export const EMPTY_CURRENT_GAME: CurrentGameState = {
+ turnInfo: null,
+ table: null,
+};
+
export function createCurrentGameReducer() {
return combineReducers({
turnInfo: turnInfoReducer,
diff --git a/frontend/src/redux/games.ts b/frontend/src/redux/games.ts
index 5e21211a..4df2f1da 100644
--- a/frontend/src/redux/games.ts
+++ b/frontend/src/redux/games.ts
@@ -10,6 +10,11 @@ export type GamesState = {
current: string | null
};
+export const EMPTY_GAMES: GamesState = {
+ all: Map(),
+ current: null,
+};
+
export const createGamesReducer = () => {
return combineReducers({
all: allGamesReducer,
bgstack15