fixed stat sorting

This commit is contained in:
2026-03-06 21:40:18 +11:00
parent b96aeef32e
commit b957df8d32

View File

@@ -25,6 +25,7 @@ templ SeasonLeagueStats(
topSaves []*db.LeagueTopSaver, topSaves []*db.LeagueTopSaver,
allStats []*db.LeaguePlayerStats, allStats []*db.LeaguePlayerStats,
) { ) {
<script src="/static/js/sortable-table.js"></script>
if len(topGoals) == 0 && len(topAssists) == 0 && len(topSaves) == 0 && len(allStats) == 0 { if len(topGoals) == 0 && len(topAssists) == 0 && len(topSaves) == 0 && len(allStats) == 0 {
<div class="bg-surface0 border border-surface1 rounded-lg p-8 text-center"> <div class="bg-surface0 border border-surface1 rounded-lg p-8 text-center">
<p class="text-subtext0 text-lg">No stats available yet.</p> <p class="text-subtext0 text-lg">No stats available yet.</p>
@@ -57,7 +58,6 @@ templ SeasonLeagueStats(
} }
</div> </div>
} }
<script src="/static/js/sortable-table.js" defer></script>
} }
templ topGoalScorersTable(season *db.Season, league *db.League, goals []*db.LeagueTopGoalScorer) { templ topGoalScorersTable(season *db.Season, league *db.League, goals []*db.LeagueTopGoalScorer) {