mirror of
https://github.com/blitzkit/blitzkit.git
synced 2026-10-24 12:09:51 +02:00
feat: reintroduced overwriting
This commit is contained in:
1 parent
d2d0477186
commit
a160ccd095
1 file changed
+17
-17
@@ -257,27 +257,27 @@ export default function Page() {
|
|||||||
size: number,
|
size: number,
|
||||||
): Promise<RatingsPlayer[]> {
|
): Promise<RatingsPlayer[]> {
|
||||||
const { neighbors } = await getRatingsNeighbors(region, id, size, true);
|
const { neighbors } = await getRatingsNeighbors(region, id, size, true);
|
||||||
// const radius = Math.round(size / 2);
|
const radius = Math.round(size / 2);
|
||||||
|
|
||||||
// const targetPosition = Object.entries(players[region][season]).find(
|
const targetPosition = Object.entries(players[region][season]).find(
|
||||||
// ([, player]) => id === player.id,
|
([, player]) => id === player.id,
|
||||||
// )?.[0];
|
)?.[0];
|
||||||
|
|
||||||
// if (targetPosition !== undefined) {
|
if (targetPosition !== undefined) {
|
||||||
// let isMissing = false;
|
let isMissing = false;
|
||||||
// const targetPositionAsNumber = parseInt(targetPosition);
|
const targetPositionAsNumber = parseInt(targetPosition);
|
||||||
|
|
||||||
// for (
|
for (
|
||||||
// let position = Math.max(0, targetPositionAsNumber - radius);
|
let position = Math.max(0, targetPositionAsNumber - radius);
|
||||||
// position <= targetPositionAsNumber + radius;
|
position <= targetPositionAsNumber + radius;
|
||||||
// position++
|
position++
|
||||||
// ) {
|
) {
|
||||||
// isMissing = !(position in players[region][season]);
|
isMissing = !(position in players[region][season]);
|
||||||
// if (isMissing) break;
|
if (isMissing) break;
|
||||||
// }
|
}
|
||||||
|
|
||||||
// if (!isMissing) return [];
|
if (!isMissing) return [];
|
||||||
// }
|
}
|
||||||
|
|
||||||
usePlayersCache.setState(
|
usePlayersCache.setState(
|
||||||
produce((draft: PlayersCache) => {
|
produce((draft: PlayersCache) => {
|
||||||
|
|||||||
Reference in new issue
Block a user