mattermost-mobile/app/screens/user_profile/index.js
enahum 248dafbe0e RN-97 Changed navigation from NavigationExperimental to ReactNative Navigation (#540)
* Add react-navigator dependency

* Add react-native-navigation dependency

* react-native-navigation, ios and android config

* update react-native-navigation

* New navigation and code cleanup

* Set ScreenBackgroundColor

* Fix channel drawer event issue

* Applied RNPN non-working popInitial notification

* Android navbar and back button

* packages and notices

* MM-redux update

* Fix draft on team switch

* Remove custom NavBar
2017-05-16 11:19:46 -04:00

34 lines
967 B
JavaScript

// Copyright (c) 2017-present Mattermost, Inc. All Rights Reserved.
// See License.txt for license information.
import {bindActionCreators} from 'redux';
import {connect} from 'react-redux';
import {handleSendMessage} from 'app/actions/views/user_profile';
import {getTheme} from 'app/selectors/preferences';
import {getCurrentUserId} from 'mattermost-redux/selectors/entities/users';
import UserProfile from './user_profile';
function mapStateToProps(state, ownProps) {
const {config} = state.entities.general;
return {
navigator: ownProps.navigator,
config,
currentUserId: getCurrentUserId(state),
user: state.entities.users.profiles[ownProps.userId],
theme: getTheme(state)
};
}
function mapDispatchToProps(dispatch) {
return {
actions: bindActionCreators({
handleSendMessage
}, dispatch)
};
}
export default connect(mapStateToProps, mapDispatchToProps)(UserProfile);