[+] Ranking for different games

pull/23/head
Azalea 2024-03-14 22:15:10 -04:00
parent a9893379f4
commit 284d366b44
2 changed files with 5 additions and 1 deletions

View File

@ -50,6 +50,7 @@
<Route path="/" component={Welcome} />
<Route path="/home" component={Home} />
<Route path="/ranking" component={Ranking} />
<Route path="/ranking/:game" component={Ranking} />
<Route path="/u/:username" component={UserHome} />
<Route path="/u/:username/:game" component={UserHome} />
<Route path="/u/:username/:game/rating" component={MaimaiRating} />

View File

@ -3,12 +3,15 @@
import { GAME } from "../libs/sdk";
import type { GenericRanking } from "../libs/generalTypes";
import StatusOverlays from "../components/StatusOverlays.svelte";
import type { GameName } from "../libs/scoring";
export let game: GameName = 'mai2';
title(`Ranking`);
let d: { users: GenericRanking[] };
let error: string | null;
Promise.all([GAME.ranking("mai2")])
Promise.all([GAME.ranking(game)])
.then(([users]) => {
console.log(users)
d = { users };