From e40f07211f5f15dcb138e2520a76d13afd3c0cfd Mon Sep 17 00:00:00 2001
From: FifthWit <fifthwitbusiness@gmail.com>
Date: Thu, 30 Jan 2025 10:44:30 -0600
Subject: formatted with prettier

---
 frontend/src/components/RankingEntry.tsx | 94 +++++++++++++++++++-------------
 1 file changed, 57 insertions(+), 37 deletions(-)

(limited to 'frontend/src/components/RankingEntry.tsx')

diff --git a/frontend/src/components/RankingEntry.tsx b/frontend/src/components/RankingEntry.tsx
index b899965..add36ca 100644
--- a/frontend/src/components/RankingEntry.tsx
+++ b/frontend/src/components/RankingEntry.tsx
@@ -1,46 +1,66 @@
 import React from 'react';
-import { Link } from "react-router-dom";
-import { RankingType, SteamRanking, SteamRankingType } from '@customTypes/Ranking';
+import { Link } from 'react-router-dom';
+import {
+  RankingType,
+  SteamRanking,
+  SteamRankingType,
+} from '@customTypes/Ranking';
 
 enum RankingCategories {
-    rankings_overall,
-    rankings_multiplayer,
-    rankings_singleplayer
+  rankings_overall,
+  rankings_multiplayer,
+  rankings_singleplayer,
 }
 
 interface RankingEntryProps {
-    curRankingData: RankingType | SteamRankingType;
-    currentLeaderboardType: RankingCategories
-};
-
-const RankingEntry: React.FC<RankingEntryProps> = (prop) => {
-    if ("placement" in prop.curRankingData) {
-        return (
-            <div className='leaderboard-entry'>
-                <span>{prop.curRankingData.placement}</span>
-                <div>
-                <Link to={`/users/${prop.curRankingData.user.steam_id}`}>           
-                    <img src={prop.curRankingData.user.avatar_link}></img>
-                    <span>{prop.curRankingData.user.user_name}</span>
-                </Link>
-                </div>
-                <span>{prop.curRankingData.total_score}</span>
-            </div>
-        )
-    } else {
-        return (
-            <div className='leaderboard-entry'>
-                <span>{prop.currentLeaderboardType == RankingCategories.rankings_singleplayer ? prop.curRankingData.sp_rank : prop.currentLeaderboardType == RankingCategories.rankings_multiplayer ? prop.curRankingData.mp_rank : prop.curRankingData.overall_rank}</span>
-                <div>
-                <Link to={`/users/${prop.curRankingData.steam_id}`}>           
-                    <img src={prop.curRankingData.avatar_link}></img>
-                    <span>{prop.curRankingData.user_name}</span>
-                </Link>
-                </div>
-                <span>{prop.currentLeaderboardType == RankingCategories.rankings_singleplayer ? prop.curRankingData.sp_score : prop.currentLeaderboardType == RankingCategories.rankings_multiplayer ? prop.curRankingData.mp_score : prop.curRankingData.overall_score}</span>
-            </div>
-        )
-    }
+  curRankingData: RankingType | SteamRankingType;
+  currentLeaderboardType: RankingCategories;
 }
 
+const RankingEntry: React.FC<RankingEntryProps> = prop => {
+  if ('placement' in prop.curRankingData) {
+    return (
+      <div className="leaderboard-entry">
+        <span>{prop.curRankingData.placement}</span>
+        <div>
+          <Link to={`/users/${prop.curRankingData.user.steam_id}`}>
+            <img src={prop.curRankingData.user.avatar_link}></img>
+            <span>{prop.curRankingData.user.user_name}</span>
+          </Link>
+        </div>
+        <span>{prop.curRankingData.total_score}</span>
+      </div>
+    );
+  } else {
+    return (
+      <div className="leaderboard-entry">
+        <span>
+          {prop.currentLeaderboardType ==
+          RankingCategories.rankings_singleplayer
+            ? prop.curRankingData.sp_rank
+            : prop.currentLeaderboardType ==
+                RankingCategories.rankings_multiplayer
+              ? prop.curRankingData.mp_rank
+              : prop.curRankingData.overall_rank}
+        </span>
+        <div>
+          <Link to={`/users/${prop.curRankingData.steam_id}`}>
+            <img src={prop.curRankingData.avatar_link}></img>
+            <span>{prop.curRankingData.user_name}</span>
+          </Link>
+        </div>
+        <span>
+          {prop.currentLeaderboardType ==
+          RankingCategories.rankings_singleplayer
+            ? prop.curRankingData.sp_score
+            : prop.currentLeaderboardType ==
+                RankingCategories.rankings_multiplayer
+              ? prop.curRankingData.mp_score
+              : prop.curRankingData.overall_score}
+        </span>
+      </div>
+    );
+  }
+};
+
 export default RankingEntry;
-- 
cgit v1.2.3

