diff --git a/js/reducers/index.js b/js/reducers/index.js index de53aa9b..d871053a 100644 --- a/js/reducers/index.js +++ b/js/reducers/index.js @@ -1,5 +1,4 @@ import { combineReducers } from "redux"; -import { SET_AVAILABLE_SKINS } from "../actionTypes"; import playlist from "./playlist"; import windows from "./windows"; @@ -8,19 +7,7 @@ import display from "./display"; import userInput from "./userInput"; import equalizer from "./equalizer"; import network from "./network"; - -const defaultSettingsState = { - availableSkins: [] -}; - -const settings = (state = defaultSettingsState, action) => { - switch (action.type) { - case SET_AVAILABLE_SKINS: - return { ...state, availableSkins: action.skins }; - default: - return state; - } -}; +import settings from "./settings"; const reducer = combineReducers({ userInput, diff --git a/js/reducers/settings.js b/js/reducers/settings.js new file mode 100644 index 00000000..eebf9783 --- /dev/null +++ b/js/reducers/settings.js @@ -0,0 +1,16 @@ +import { SET_AVAILABLE_SKINS } from "../actionTypes"; + +const defaultSettingsState = { + availableSkins: [] +}; + +const settings = (state = defaultSettingsState, action) => { + switch (action.type) { + case SET_AVAILABLE_SKINS: + return { ...state, availableSkins: action.skins }; + default: + return state; + } +}; + +export default settings;