mirror of
https://github.com/blitzkit/blitzkit.git
synced 2026-10-23 19:49:50 +02:00
fix: no existing cache overwrites for neighbors
This commit is contained in:
1 parent
e79c4a1e3f
commit
ca8dd5a702
1 file changed
+9
-5
@@ -282,10 +282,14 @@ export default function Page() {
|
|||||||
usePlayersCache.setState(
|
usePlayersCache.setState(
|
||||||
produce((draft: PlayersCache) => {
|
produce((draft: PlayersCache) => {
|
||||||
neighbors.forEach((neighbor) => {
|
neighbors.forEach((neighbor) => {
|
||||||
draft[region][season][neighbor.number - 1] = {
|
const position = neighbor.number - 1;
|
||||||
id: neighbor.spa_id,
|
|
||||||
score: neighbor.score,
|
if (!(position in draft[region][season])) {
|
||||||
} satisfies BlitzkriegRatingsLeaderboardEntry;
|
draft[region][season][position] = {
|
||||||
|
id: neighbor.spa_id,
|
||||||
|
score: neighbor.score,
|
||||||
|
} satisfies BlitzkriegRatingsLeaderboardEntry;
|
||||||
|
}
|
||||||
});
|
});
|
||||||
}),
|
}),
|
||||||
);
|
);
|
||||||
@@ -642,7 +646,7 @@ export default function Page() {
|
|||||||
});
|
});
|
||||||
cacheNeighbors(
|
cacheNeighbors(
|
||||||
players[region][season][position].id,
|
players[region][season][position].id,
|
||||||
ROWS_PER_PAGE * 3,
|
4 * ROWS_PER_PAGE - 2,
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
Reference in new issue
Block a user