From edff87fdf77b32fd03ee26892226068a53fbfaa6 Mon Sep 17 00:00:00 2001
From: Wolfboy248 <121288977+Wolfboy248@users.noreply.github.com>
Date: Fri, 6 Sep 2024 13:05:39 +0200
Subject: refactor: rankings page

---
 frontend/src/components/RankingEntry.tsx | 22 ++++++++++++++++++++++
 1 file changed, 22 insertions(+)
 create mode 100644 frontend/src/components/RankingEntry.tsx

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

diff --git a/frontend/src/components/RankingEntry.tsx b/frontend/src/components/RankingEntry.tsx
new file mode 100644
index 0000000..b77bb3d
--- /dev/null
+++ b/frontend/src/components/RankingEntry.tsx
@@ -0,0 +1,22 @@
+import React from 'react';
+import { Link } from "react-router-dom";
+import { RankingType } from '../types/Ranking';
+
+interface RankingEntryProps {
+    curRankingData: RankingType;
+};
+
+const RankingEntry: React.FC<RankingEntryProps> = (curRankingData) => {
+    return (
+        <div className='leaderboard-entry'>
+            <span>{curRankingData.curRankingData.placement}</span>
+            <div>
+                <img src={curRankingData.curRankingData.user.avatar_link}></img>
+                <span>{curRankingData.curRankingData.user.user_name}</span>
+            </div>
+            <span>{curRankingData.curRankingData.total_score}</span>
+        </div>
+    )
+}
+
+export default RankingEntry;
-- 
cgit v1.2.3

