diff options
| author | Arda Serdar Pektezol <1669855+pektezol@users.noreply.github.com> | 2025-10-28 11:28:56 +0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-10-28 10:28:56 +0300 |
| commit | fa723fb81bb8af91b38a055b1e21c3afc019c5a1 (patch) | |
| tree | 1557715d7b2cba51ec1cf037ff66324b9e978cfb /frontend/src/api/Stats.ts | |
| parent | fix/backend: have timeline start at the start of the year (#295) (diff) | |
| download | lphub-fa723fb81bb8af91b38a055b1e21c3afc019c5a1.tar.gz lphub-fa723fb81bb8af91b38a055b1e21c3afc019c5a1.tar.bz2 lphub-fa723fb81bb8af91b38a055b1e21c3afc019c5a1.zip | |
feat/frontend: add dates to recent scores in homepage (#296)
Diffstat (limited to 'frontend/src/api/Stats.ts')
| -rw-r--r-- | frontend/src/api/Stats.ts | 49 |
1 files changed, 25 insertions, 24 deletions
diff --git a/frontend/src/api/Stats.ts b/frontend/src/api/Stats.ts index 21654b5..a334918 100644 --- a/frontend/src/api/Stats.ts +++ b/frontend/src/api/Stats.ts | |||
| @@ -2,36 +2,37 @@ import axios from "axios"; | |||
| 2 | import { url } from "./Api"; | 2 | import { url } from "./Api"; |
| 3 | 3 | ||
| 4 | export interface PortalCountData { | 4 | export interface PortalCountData { |
| 5 | date: string; | 5 | date: string; |
| 6 | count: number; | 6 | count: number; |
| 7 | } | 7 | } |
| 8 | 8 | ||
| 9 | export interface RecordsTimelineResponse { | 9 | export interface RecordsTimelineResponse { |
| 10 | timeline_singleplayer: PortalCountData[]; | 10 | timeline_singleplayer: PortalCountData[]; |
| 11 | timeline_multiplayer: PortalCountData[]; | 11 | timeline_multiplayer: PortalCountData[]; |
| 12 | } | 12 | } |
| 13 | 13 | ||
| 14 | export interface ScoreLog { | 14 | export interface ScoreLog { |
| 15 | game: { | 15 | game: { |
| 16 | id: number; | 16 | id: number; |
| 17 | name: string; | 17 | name: string; |
| 18 | image: string; | 18 | image: string; |
| 19 | is_coop: boolean; | 19 | is_coop: boolean; |
| 20 | category_portals: null; | 20 | category_portals: null; |
| 21 | }; | 21 | }; |
| 22 | user: { | 22 | user: { |
| 23 | steam_id: string; | 23 | steam_id: string; |
| 24 | user_name: string; | 24 | user_name: string; |
| 25 | }; | 25 | }; |
| 26 | map: { | 26 | map: { |
| 27 | id: number; | 27 | id: number; |
| 28 | name: string; | 28 | name: string; |
| 29 | image: string; | 29 | image: string; |
| 30 | is_disabled: boolean; | 30 | is_disabled: boolean; |
| 31 | portal_count: number; | 31 | portal_count: number; |
| 32 | difficulty: number; | 32 | difficulty: number; |
| 33 | }; | 33 | }; |
| 34 | score_count: number; | 34 | score_count: number; |
| 35 | date: string; | ||
| 35 | } | 36 | } |
| 36 | 37 | ||
| 37 | export async function get_portal_count_history(): Promise<RecordsTimelineResponse | undefined> { | 38 | export async function get_portal_count_history(): Promise<RecordsTimelineResponse | undefined> { |