This commit is contained in:
parent
80eb7a17fe
commit
dec55d3613
@ -25,6 +25,7 @@ export default function Home() {
|
||||
|
||||
const updateRank = useCallback(async () => {
|
||||
if (!playerId || !rank || !page) return;
|
||||
console.log("Updating rank...");
|
||||
const playerData = await fetch(
|
||||
SS_GET_PLAYER_DATA_FULL.replace("{}", playerId)
|
||||
).then((res) => res.json());
|
||||
@ -34,7 +35,6 @@ export default function Home() {
|
||||
)
|
||||
.then((res) => res.json())
|
||||
.then((res) => res.players.find((player: any) => player.rank === rank));
|
||||
console.log(playerAtRank);
|
||||
|
||||
if (!playerAtRank) {
|
||||
console.log("Player not found");
|
||||
@ -61,9 +61,11 @@ export default function Home() {
|
||||
{ppDiff && (
|
||||
<div className="flex gap-1 flex-col p-2">
|
||||
<p>
|
||||
{formatNumber(ppDiff, 2)}pp to reach #{formatNumber(rank)}
|
||||
{formatNumber(ppDiff, 2)}pp until rank {formatNumber(rank)}
|
||||
</p>
|
||||
{startedAt && <p>Day {getDaysSince(new Date(Number(startedAt)))}</p>}
|
||||
{startedAt && (
|
||||
<p>Day {getDaysSince(new Date(Number(startedAt))) + 1}</p>
|
||||
)}
|
||||
</div>
|
||||
)}
|
||||
</main>
|
||||
|
Loading…
x
Reference in New Issue
Block a user