Added leaderboard vars...

This commit is contained in:
BurnyLlama 2021-11-04 23:20:41 +01:00
parent 823f035a45
commit 9bf4326918
2 changed files with 5 additions and 1 deletions

View File

@ -23,7 +23,9 @@ routes.get(
'/maps/:map',
(req, res) => {
const map = wrapper.map(req.params.map)
tx(req, res)('pages/mapSingle.njk', { map }, { currentSection: "maps" })
const raceLeaderboard = wrapper.leaderboardRace(req.params.map, 1, 10)
const teamLeaderboard = wrapper.leaderboardTeamrace(req.params.map, 1, 10)
tx(req, res)('pages/mapSingle.njk', { map, raceLeaderboard, teamLeaderboard }, { currentSection: "maps" })
}
)

View File

@ -1,6 +1,8 @@
{% extends "../templates/basic.njk" %}
{% import "../components/_map.njk" as mapComponent %}
{% set map = data.map %}
{% set raceLeaderboard = data.raceLeaderboard %}
{% set teamLeaderboard = data.teamLeaderboard %}
{% block head %}
<title>DDStats - Maps!</title>