Unify player profiles across T5 and T6
This commit is contained in:
@@ -15,12 +15,14 @@ export type LeaderboardMetric = typeof leaderboardMetrics[number]['key'];
|
||||
|
||||
export type PlayerStats = Record<LeaderboardMetric, number>;
|
||||
export interface PlayerMapRecord extends PlayerStats {
|
||||
game: string;
|
||||
key: string;
|
||||
name: string;
|
||||
lastSeen: string;
|
||||
}
|
||||
export interface PlayerMatch {
|
||||
id: number;
|
||||
game: string;
|
||||
server: string;
|
||||
server_deleted_at?: string | null;
|
||||
mapName: string;
|
||||
@@ -37,7 +39,6 @@ export interface PlayerMatch {
|
||||
bestScore: number;
|
||||
}
|
||||
export interface PlayerProfile {
|
||||
game: string;
|
||||
guid: string;
|
||||
name: string;
|
||||
firstSeen: string;
|
||||
@@ -49,8 +50,8 @@ export interface PlayerProfile {
|
||||
limit: number;
|
||||
}
|
||||
|
||||
export function playerProfileHref(game: string, guid: string): string {
|
||||
return `/leaderboard/players/${encodeURIComponent(game)}/${encodeURIComponent(guid)}`;
|
||||
export function playerProfileHref(guid: string): string {
|
||||
return `/leaderboard/players/${encodeURIComponent(guid)}`;
|
||||
}
|
||||
|
||||
export interface LeaderboardEntry {
|
||||
|
||||
Reference in New Issue
Block a user