mattermost-mobile/app/reducers/views/select_server.js
Elias Nahum 36e55c95a2
MM-23570 Migrate from Segment to Rudder (#4293)
* Replace Segment with Rudder (ios not working)

* Update @assets reference and fix tests
2020-05-13 16:54:07 -04:00

22 lines
496 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,
});