diff options
| author | Wolfboy248 <121288977+Wolfboy248@users.noreply.github.com> | 2024-09-06 13:05:39 +0200 |
|---|---|---|
| committer | Wolfboy248 <121288977+Wolfboy248@users.noreply.github.com> | 2024-09-06 13:05:39 +0200 |
| commit | edff87fdf77b32fd03ee26892226068a53fbfaa6 (patch) | |
| tree | de6ed2b1acf0c39421983bebe9737e8a615a950d /frontend/src/components/RankingEntry.tsx | |
| parent | refactor: maplist page (diff) | |
| download | lphub-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.tsx | 22 |
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 @@ | |||
| 1 | import React from 'react'; | ||
| 2 | import { Link } from "react-router-dom"; | ||
| 3 | import { RankingType } from '../types/Ranking'; | ||
| 4 | |||
| 5 | interface RankingEntryProps { | ||
| 6 | curRankingData: RankingType; | ||
| 7 | }; | ||
| 8 | |||
| 9 | const 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 | |||
| 22 | export default RankingEntry; | ||