diff --git a/webapp/src/components/ranking/RankingRetriever.js b/webapp/src/components/ranking/RankingRetriever.js index e22d2e0..a84de7e 100644 --- a/webapp/src/components/ranking/RankingRetriever.js +++ b/webapp/src/components/ranking/RankingRetriever.js @@ -74,7 +74,7 @@ class RankingRetriever{ ] }*/ } - async getMyPosition(user){ + async getUser(user){ try { const response = await axios.get(this.apiUrl + '/'+user);//finding the top ten diff --git a/webapp/src/components/ranking/RankingView.js b/webapp/src/components/ranking/RankingView.js index e7c76f4..e88581e 100644 --- a/webapp/src/components/ranking/RankingView.js +++ b/webapp/src/components/ranking/RankingView.js @@ -46,48 +46,53 @@ const RankingView = () => {

{t("ranking.ranking")}

-
- setSearchTerm(e.target.value)} - placeholder={t("ranking.enter_username")} - /> - -
{rankingData && rankingData.length > 0 && myRankingData ? ( <> - - - - - - - - - - - - {rankingData.map((user, index) => ( - - - - - + +
{t("ranking.position")}{t("ranking.username")}{t("ranking.points")}{t("ranking.num_games")}
{index + 1}{user._id}{user.totalPoints}{user.totalCompetitiveGames}
+ + + + + + - ))} - {/* Blank row */} - - - - - - - - - - -
{t("ranking.position")}{t("ranking.username")}{t("ranking.points")}{t("ranking.num_games")}
{myRankingData.position}{myRankingData._id}{myRankingData.totalPoints}{myRankingData.totalCompetitiveGames}
+ + + {rankingData.map((user, index) => ( + + {index + 1} + {user._id} + {user.totalPoints} + {user.totalCompetitiveGames} + + ))} + {/* Blank row */} + + + setSearchTerm(e.target.value)} + placeholder={t("ranking.enter_username")} + /> + + +
+ +
+ + + + + {myRankingData.position} + {myRankingData._id} + {myRankingData.totalPoints} + {myRankingData.totalCompetitiveGames} + + + + ) : ( < Loader /> diff --git a/webapp/src/custom.css b/webapp/src/custom.css index 4c819c1..f6660f9 100644 --- a/webapp/src/custom.css +++ b/webapp/src/custom.css @@ -1598,6 +1598,11 @@ h2{ box-shadow: 0 0 10px rgba(197, 191, 191, 0.726);*/ } +.table tbody tr.penultimate-row td div{ + background-color: #171717; + padding: 0.5em; +} + .table th,td{ padding-left: 30px; padding-right: 30px; @@ -1666,7 +1671,7 @@ input[type="text"] { } /* Estilo para el botón */ -.search > button{ +#search { font-size: 18px; /* Tamaño de letra */ width: 7em; height: 2em;