aboutsummaryrefslogtreecommitdiff
path: root/frontend/src/components/RankingEntry.tsx
diff options
context:
space:
mode:
authorWolfboy248 <121288977+Wolfboy248@users.noreply.github.com>2024-09-06 13:05:39 +0200
committerWolfboy248 <121288977+Wolfboy248@users.noreply.github.com>2024-09-06 13:05:39 +0200
commitedff87fdf77b32fd03ee26892226068a53fbfaa6 (patch)
treede6ed2b1acf0c39421983bebe9737e8a615a950d /frontend/src/components/RankingEntry.tsx
parentrefactor: maplist page (diff)
downloadlphub-edff87fdf77b32fd03ee26892226068a53fbfaa6.tar.gz
lphub-edff87fdf77b32fd03ee26892226068a53fbfaa6.tar.bz2
lphub-edff87fdf77b32fd03ee26892226068a53fbfaa6.zip
refactor: rankings page
Diffstat (limited to 'frontend/src/components/RankingEntry.tsx')
-rw-r--r--frontend/src/components/RankingEntry.tsx22
1 files changed, 22 insertions, 0 deletions
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 @@
1import React from 'react';
2import { Link } from "react-router-dom";
3import { RankingType } from '../types/Ranking';
4
5interface RankingEntryProps {
6 curRankingData: RankingType;
7};
8
9const RankingEntry: React.FC<RankingEntryProps> = (curRankingData) => {
10 return (
11 <div className='leaderboard-entry'>
12 <span>{curRankingData.curRankingData.placement}</span>
13 <div>
14 <img src={curRankingData.curRankingData.user.avatar_link}></img>
15 <span>{curRankingData.curRankingData.user.user_name}</span>
16 </div>
17 <span>{curRankingData.curRankingData.total_score}</span>
18 </div>
19 )
20}
21
22export default RankingEntry;