mattermost-mobile/app/reducers/views/select_server.js
2018-06-19 19:14:50 -04:00

22 lines
495 B
JavaScript

// Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved.
// See LICENSE.txt for license information.
import {combineReducers} from 'redux';
import Config from 'assets/config.json';
import {ViewTypes} from 'app/constants';
function serverUrl(state = Config.DefaultServerUrl, action) {
switch (action.type) {
case ViewTypes.SERVER_URL_CHANGED:
return action.serverUrl;
default:
return state;
}
}
export default combineReducers({
serverUrl,
});