diff --git a/js/reducers/index.js b/js/reducers/index.js index 7eae9757..de53aa9b 100644 --- a/js/reducers/index.js +++ b/js/reducers/index.js @@ -1,9 +1,5 @@ import { combineReducers } from "redux"; -import { - SET_AVAILABLE_SKINS, - NETWORK_CONNECTED, - NETWORK_DISCONNECTED -} from "../actionTypes"; +import { SET_AVAILABLE_SKINS } from "../actionTypes"; import playlist from "./playlist"; import windows from "./windows"; @@ -11,6 +7,7 @@ import media from "./media"; import display from "./display"; import userInput from "./userInput"; import equalizer from "./equalizer"; +import network from "./network"; const defaultSettingsState = { availableSkins: [] @@ -25,17 +22,6 @@ const settings = (state = defaultSettingsState, action) => { } }; -const network = (state = { connected: true }, action) => { - switch (action.type) { - case NETWORK_CONNECTED: - return { ...state, connected: true }; - case NETWORK_DISCONNECTED: - return { ...state, connected: false }; - default: - return state; - } -}; - const reducer = combineReducers({ userInput, windows, diff --git a/js/reducers/network.js b/js/reducers/network.js new file mode 100644 index 00000000..4e5ba635 --- /dev/null +++ b/js/reducers/network.js @@ -0,0 +1,14 @@ +import { NETWORK_CONNECTED, NETWORK_DISCONNECTED } from "../actionTypes"; + +const network = (state = { connected: true }, action) => { + switch (action.type) { + case NETWORK_CONNECTED: + return { ...state, connected: true }; + case NETWORK_DISCONNECTED: + return { ...state, connected: false }; + default: + return state; + } +}; + +export default network;