MM-24201 List joinable teams alphabetically (#4439)

Matches webapp behaviour.

Co-authored-by: Amit Uttam <changingrainbows@gmail.com>
This commit is contained in:
Mattermost Build 2020-06-18 03:21:18 +02:00 committed by GitHub
parent 817d1792ce
commit 916d93daab
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -6,7 +6,7 @@ import {connect} from 'react-redux';
import {getTeams, addUserToTeam} from '@mm-redux/actions/teams';
import {getTheme} from '@mm-redux/selectors/entities/preferences';
import {getJoinableTeams} from '@mm-redux/selectors/entities/teams';
import {getSortedJoinableTeams} from '@mm-redux/selectors/entities/teams';
import {getCurrentUser} from '@mm-redux/selectors/entities/users';
import {logout} from 'app/actions/views/user';
@ -25,7 +25,7 @@ function mapStateToProps(state) {
currentUserIsGuest,
isLandscape: isLandscape(state),
teamsRequest: state.requests.teams.getTeams,
teams: getJoinableTeams(state),
teams: getSortedJoinableTeams(state, currentUser.locale),
theme: getTheme(state),
};
}