Skip to content

Commit e1cadf3

Browse files
committed
Add score and rank to leaderboard
1 parent 42d7f1d commit e1cadf3

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

src/pages/leaderboards.vue

+7-1
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,8 @@ const roomsProp = R.prop('rooms')
2727
const powerProp = R.prop('power')
2828
const gclProp = R.prop('gcl')
2929
const combinedRclProp = R.prop('combinedRCL')
30+
const scoreProp = R.prop('score')
31+
const rankProp = R.prop('rank')
3032
3133
const filterNPCUsers = R.filter(R.compose(R.not, R.includes(R.__, ['2', '3']), R.prop('id')))
3234
@@ -39,6 +41,8 @@ const sortByRooms = filterSortProp(roomsProp)
3941
const sortByPower = filterSortProp(powerProp)
4042
const sortByGCL = filterSortProp(gclProp)
4143
const sortByCombinedRcl = filterSortProp(combinedRclProp)
44+
const sortByScore = filterSortProp(scoreProp)
45+
const sortByRank = filterSortProp(rankProp)
4246
4347
export default {
4448
components: {
@@ -51,7 +55,9 @@ export default {
5155
{ label: 'GCL', field: 'gclLevel', fn: sortByGCL },
5256
{ label: 'Power', field: 'powerLevel', fn: sortByPower },
5357
{ label: 'Rooms', field: 'rooms', fn: sortByRooms },
54-
{ label: 'Comb. RCL', field: 'combinedRCL', fn: sortByCombinedRcl }
58+
{ label: 'Comb. RCL', field: 'combinedRCL', fn: sortByCombinedRcl },
59+
{ label: 'Score', field: 'score', fn: sortByScore },
60+
{ label: 'Rank', field: 'rank', fn: sortByRank },
5561
]
5662
}
5763
},

0 commit comments

Comments
 (0)