sort followed tags alphabetically

This commit is contained in:
Sean Yesmunt 2019-06-10 12:58:39 -04:00
parent a22d0270d0
commit 478251f900
2 changed files with 3 additions and 2 deletions

2
dist/bundle.es.js vendored
View file

@ -3878,7 +3878,7 @@ const selectKnownTagsByName = reselect.createSelector(selectState$7, state => st
const selectFollowedTagsList = reselect.createSelector(selectState$7, state => state.followedTags);
const selectFollowedTags = reselect.createSelector(selectFollowedTagsList, followedTags => followedTags.map(tag => ({ name: tag })));
const selectFollowedTags = reselect.createSelector(selectFollowedTagsList, followedTags => followedTags.map(tag => ({ name: tag })).sort((a, b) => a.name.localeCompare(b.name)));
const selectUnfollowedTags = reselect.createSelector(selectKnownTagsByName, selectFollowedTagsList, (tagsByName, followedTags) => {
const followedTagsSet = new Set(followedTags);

View file

@ -15,7 +15,8 @@ export const selectFollowedTagsList = createSelector(
export const selectFollowedTags = createSelector(
selectFollowedTagsList,
(followedTags: Array<string>): Array<Tag> => followedTags.map(tag => ({ name: tag }))
(followedTags: Array<string>): Array<Tag> =>
followedTags.map(tag => ({ name: tag })).sort((a, b) => a.name.localeCompare(b.name))
);
export const selectUnfollowedTags = createSelector(