blob: 612bd0c577e0a4fc9a126a00a70f4cbc12b5c77c (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
|
// @flow
import { routerReducer } from 'react-router-redux';
import { combineReducers } from 'redux';
import type { ApiPlayer } from './api/model';
import type { CurrentGameState } from './redux/currentGame';
import { createCurrentGameReducer } from './redux/currentGame';
import type { GamesState } from './redux/games';
import { createGamesReducer } from './redux/games';
import { currentUserReducer } from './redux/user';
export type GlobalState = {
currentGame: CurrentGameState;
currentUser: ApiPlayer;
games: GamesState;
routing: any;
}
export function createReducer() {
return combineReducers({
currentGame: createCurrentGameReducer(),
currentUser: currentUserReducer,
games: createGamesReducer(),
routing: routerReducer,
});
}
|