diff options
author | Fire Demon <firedemon@creature.cafe> | 2020-09-21 23:06:58 -0500 |
---|---|---|
committer | Fire Demon <firedemon@creature.cafe> | 2020-09-21 23:06:58 -0500 |
commit | 0f60fd09f614b4f2f09f1cb1c8b2722767105261 (patch) | |
tree | b70d2349132c674c6969d3b5742eb15d4b168769 /app/javascript/flavours/glitch/features/getting_started | |
parent | 14ab244bacab1649f344b08d6898eccccea45311 (diff) |
Sort boosts list to top of lists
Diffstat (limited to 'app/javascript/flavours/glitch/features/getting_started')
-rw-r--r-- | app/javascript/flavours/glitch/features/getting_started/index.js | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/app/javascript/flavours/glitch/features/getting_started/index.js b/app/javascript/flavours/glitch/features/getting_started/index.js index b4549fdf8..43d535ac5 100644 --- a/app/javascript/flavours/glitch/features/getting_started/index.js +++ b/app/javascript/flavours/glitch/features/getting_started/index.js @@ -46,7 +46,10 @@ const makeMapStateToProps = () => { return lists; } - return lists.toList().filter(item => !!item).sort((a, b) => a.get('title').localeCompare(b.get('title'))); + return lists.toList().filter(item => !!item).sort((a, b) => { + const r = (b.get('reblogs') ? 1 : 0) - (a.get('reblogs') ? 1 : 0); + return r === 0 ? a.get('title').localeCompare(b.get('title')) : r; + }); }); const mapStateToProps = state => ({ |