forked from Ivasoft/mattermost-mobile
* MM-17588 Remove navigation component from stack * MM-175986 Fix Clock Display Settings on iOS * Fix markdown and team icon currentServerUrl * Fix closing permalink logs out the user * Fix file attachment document ref * Fix applyTheme when changing a theme in the app * Feedback review * remove / when fetching the image on the markdown table on relative paths
37 lines
1.1 KiB
JavaScript
37 lines
1.1 KiB
JavaScript
// Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved.
|
|
// See LICENSE.txt for license information.
|
|
|
|
import {bindActionCreators} from 'redux';
|
|
import {connect} from 'react-redux';
|
|
|
|
import {getCurrentTeamId, getMySortedTeamIds, getJoinableTeamIds} from 'mattermost-redux/selectors/entities/teams';
|
|
import {getTheme} from 'mattermost-redux/selectors/entities/preferences';
|
|
|
|
import {showModal} from 'app/actions/navigation';
|
|
import {handleTeamChange} from 'app/actions/views/select_team';
|
|
import {getCurrentLocale} from 'app/selectors/i18n';
|
|
|
|
import TeamsList from './teams_list';
|
|
|
|
function mapStateToProps(state) {
|
|
const locale = getCurrentLocale(state);
|
|
|
|
return {
|
|
currentTeamId: getCurrentTeamId(state),
|
|
hasOtherJoinableTeams: getJoinableTeamIds(state).length > 0,
|
|
teamIds: getMySortedTeamIds(state, locale),
|
|
theme: getTheme(state),
|
|
};
|
|
}
|
|
|
|
function mapDispatchToProps(dispatch) {
|
|
return {
|
|
actions: bindActionCreators({
|
|
handleTeamChange,
|
|
showModal,
|
|
}, dispatch),
|
|
};
|
|
}
|
|
|
|
export default connect(mapStateToProps, mapDispatchToProps)(TeamsList);
|