mattermost-mobile/app/screens/settings/index.js
enahum 5b1a68db74 RN-137 Team sidebar (#577)
* Team sidebar

* Update NOTICES.txt

* feedback review
2017-05-29 15:51:11 -04:00

36 lines
965 B
JavaScript

// Copyright (c) 2016-present Mattermost, Inc. All Rights Reserved.
// See License.txt for license information.
import {bindActionCreators} from 'redux';
import {connect} from 'react-redux';
import {clearErrors} from 'mattermost-redux/actions/errors';
import {logout} from 'mattermost-redux/actions/users';
import {getTheme} from 'app/selectors/preferences';
import Settings from './settings';
function mapStateToProps(state, ownProps) {
const {config} = state.entities.general;
return {
...ownProps,
config,
theme: getTheme(state),
errors: state.errors,
currentUserId: state.entities.users.currentUserId,
currentTeamId: state.entities.teams.currentTeamId
};
}
function mapDispatchToProps(dispatch) {
return {
actions: bindActionCreators({
clearErrors,
logout
}, dispatch)
};
}
export default connect(mapStateToProps, mapDispatchToProps)(Settings);