feat: remove neighbor relative positional caching

This commit is contained in:
TrèsAbhi committed 2023-11-16 11:14:38 -06:00
1 parent 14710b5218
commit ee6d2e7d82
1 file changed
+3 -2
+3 -2
View File
@@ -305,13 +305,14 @@ export default function Page() {
if (seedingPlayerNeighborEntry === undefined) return null;
const seedingPlayerPosition = parseInt(seedingPlayerNeighborEntry[0]);
// const seedingPlayerPosition = parseInt(seedingPlayerNeighborEntry[0]);
const { neighbors } = await getRatingsNeighbors(region, id, size, true);
useLeaderboardCache.setState(
produce((draft: LeaderboardCache) => {
neighbors.forEach((neighbor, neighborIndex) => {
const position = neighborIndex - radius + seedingPlayerPosition;
// const position = neighborIndex - radius + seedingPlayerPosition;
const position = neighbor.number - 1;
if (!(position in draft[region][season])) {
draft[region][season][position] = neighbor.spa_id;