From a65d6d9127c3fa7f6a8ecaec5d1ffd1f47c2bc98 Mon Sep 17 00:00:00 2001
From: Arda Serdar Pektezol <1669855+pektezol@users.noreply.github.com>
Date: Tue, 3 Sep 2024 00:08:53 +0300
Subject: refactor: port to typescript

---
 frontend/src/types/Profile.tsx | 63 ++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 63 insertions(+)
 create mode 100644 frontend/src/types/Profile.tsx

(limited to 'frontend/src/types/Profile.tsx')

diff --git a/frontend/src/types/Profile.tsx b/frontend/src/types/Profile.tsx
new file mode 100644
index 0000000..2bb037c
--- /dev/null
+++ b/frontend/src/types/Profile.tsx
@@ -0,0 +1,63 @@
+import { Pagination } from "./Pagination";
+
+export interface UserShort {
+  steam_id: string;
+  user_name: string;
+  avatar_link: string;
+};
+
+export interface UserProfile {
+  profile: boolean;
+  steam_id: string;
+  user_name: string;
+  avatar_link: string;
+  country_code: string;
+  titles: UserProfileTitles[];
+  links: UserProfileLinks;
+  rankings: UserProfileRankings;
+  records: UserProfileRecords[];
+  pagination: Pagination;
+};
+
+interface UserProfileTitles {
+  name: string;
+  color: string;
+};
+
+interface UserProfileLinks {
+  p2sr: string;
+  steam: string;
+  youtube: string;
+  twitch: string;
+};
+
+interface UserProfileRankings {
+  overall: UserProfileRankingsDetail;
+  singleplayer: UserProfileRankingsDetail;
+  cooperative: UserProfileRankingsDetail;
+};
+
+interface UserProfileRecords {
+  game_id: number;
+  category_id: number;
+  map_id: number;
+  map_name: string;
+  map_wr_count: number;
+  placement: number;
+  scores: UserProfileRecordsScores[]
+};
+
+interface UserProfileRecordsScores {
+  record_id: number;
+  demo_id: string;
+  score_count: number;
+  score_time: number;
+  date: string;
+};
+
+interface UserProfileRankingsDetail {
+  rank: number;
+  completion_count: number;
+  completion_total: number;
+};
+
-- 
cgit v1.2.3

