Minor optimization

This commit is contained in:
Eduard Urbach 2018-03-10 16:43:57 +01:00
parent 9958364b92
commit 51d2fb20a7
2 changed files with 3 additions and 3 deletions

View File

@ -1,4 +1,4 @@
component EditorRankingList(users []*arn.User, url string)
component EditorRankingList(users []*arn.User, idToScore map[string]int, url string)
h1.page-title Editor ranking list
UsersTabs(url)
@ -15,7 +15,7 @@ component EditorRankingList(users []*arn.User, url string)
td.ranking-user
Avatar(user)
a.ajax(href=user.Link())= user.Nick
td.ranking-score= user.EditorScore()
td.ranking-score= idToScore[user.ID]
.footer.mountable
p Score is generated from new data submissions and data fixes.

View File

@ -84,7 +84,7 @@ func Editors(ctx *aero.Context) string {
return scoreA > scoreB
})
return ctx.HTML(components.EditorRankingList(users, ctx.URI()))
return ctx.HTML(components.EditorRankingList(users, score, ctx.URI()))
}
// ActiveNoAvatar ...