import { PlayerReducer } from "../common/player/player.reducer" ; import { HomeReducer } from "../pages/home/home.reducer" ; import { ActionReducer , combineReducers } from "@ngrx/store" ; import { storeFreeze } from 'ngrx-store-freeze' ; import { compose } from "@ngrx/core" ; import { AppState } from "./app.state" ; const reducers = { player : PlayerReducer , home : HomeReducer , } ; export const developmentReducer = compose ( storeFreeze , combineReducers ) ( reducers ) ; const productionReducer = combineReducers ( reducers ) ; export function reducer ( state , action ) { const environment = 'dev' ; return ( environment === 'dev' ) ? productionReducer ( state , action ) : developmentReducer ( state , action ) ; }