* 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
23 lines
913 B
JavaScript
23 lines
913 B
JavaScript
// Copyright (c) 2017-present Mattermost, Inc. All Rights Reserved.
|
|
// See License.txt for license information.
|
|
|
|
import {connect} from 'react-redux';
|
|
|
|
import {General} from 'mattermost-redux/constants';
|
|
import {getCurrentUserId, getCurrentUserRoles} from 'mattermost-redux/selectors/entities/users';
|
|
import {showCreateOption} from 'mattermost-redux/utils/channel_utils';
|
|
import {isAdmin, isSystemAdmin} from 'mattermost-redux/utils/user_utils';
|
|
|
|
import ChannelDrawerList from './channel_drawer_list';
|
|
|
|
function mapStateToProps(state, ownProps) {
|
|
const {config, license} = state.entities.general;
|
|
const roles = getCurrentUserId(state) ? getCurrentUserRoles(state) : '';
|
|
|
|
return {
|
|
canCreatePrivateChannels: showCreateOption(config, license, General.PRIVATE_CHANNEL, isAdmin(roles), isSystemAdmin(roles)),
|
|
...ownProps
|
|
};
|
|
}
|
|
|
|
export default connect(mapStateToProps)(ChannelDrawerList);
|