* Remove serverVersion check to allow GitLab login * Avoid unncessary re-renders on the root screen * Avoid unncessary re-renders on the options modal screen * Avoid unncessary re-renders on the thread screen * Avoid unncessary re-renders on the offline indicator component * Avoid unncessary re-renders on the channel loader component * review feedback
22 lines
600 B
JavaScript
22 lines
600 B
JavaScript
// Copyright (c) 2017-present Mattermost, Inc. All Rights Reserved.
|
|
// See License.txt for license information.
|
|
|
|
import {connect} from 'react-redux';
|
|
|
|
import {getConnection} from 'app/selectors/device';
|
|
|
|
import OfflineIndicator from './offline_indicator';
|
|
|
|
function mapStateToProps(state) {
|
|
const {websocket} = state.requests.general;
|
|
const webSocketStatus = websocket.status;
|
|
const isConnecting = websocket.error > 1;
|
|
|
|
return {
|
|
isConnecting,
|
|
isOnline: getConnection(state),
|
|
webSocketStatus
|
|
};
|
|
}
|
|
|
|
export default connect(mapStateToProps)(OfflineIndicator);
|