MCPcopy Create free account
hub / github.com/codecombat/codecombat / sortMyClans

Method sortMyClans

app/views/courses/CoursesView.js:339–346  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

337 }
338
339 sortMyClans () {
340 this.myClans = _.sortBy(this.myClans, clan => {
341 let left
342 const playerCount = (left = this.getAILeagueStat('codePoints', clan._id, 'playerCount')) != null ? left : 0
343 return -playerCount
344 })
345 return this.myClans
346 }
347
348 handleUserOnline () {
349 return this.renderSelectors('.teacher-icon')

Callers 1

loadAILeagueStatsMethod · 0.95

Calls 1

getAILeagueStatMethod · 0.95

Tested by

no test coverage detected