Skip to content

Commit

Permalink
[issue-299]:Leaderboard display error (on bot Football Rivals)
Browse files Browse the repository at this point in the history
  • Loading branch information
anhnhu committed Feb 24, 2025
1 parent ed24b3f commit 69bfc4f
Showing 1 changed file with 2 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -48,15 +48,14 @@ export const GameAccountListArea = ({ isLoading, leaderboardPersonItems }: Props
}];
}

const mineRank = leaderboardPersonItems[indexOfMine].rank;
const rankGap = 20;
let firstItemRank = mineRank - rankGap;
let firstItemRank = indexOfMine - rankGap + 1;

if (firstItemRank <= 0) {
firstItemRank = 1;
}

let lastItemRank = mineRank + rankGap;
let lastItemRank = indexOfMine + rankGap + 1;

if (lastItemRank >= leaderboardPersonItems.length) {
lastItemRank = leaderboardPersonItems.length;
Expand Down

0 comments on commit 69bfc4f

Please sign in to comment.