diff --git a/src/app/page.tsx b/src/app/page.tsx index 6418068..85d169c 100644 --- a/src/app/page.tsx +++ b/src/app/page.tsx @@ -53,21 +53,31 @@ export default function Home() { setInterval(updateRank, 1000 * 60 * 1); // update every minute }, [mounted, updateRank]); - return ( -
- {!playerId &&

Invalid player ID

} + /** + * {!playerId &&

Invalid player ID

} {!rank &&

Invalid rank

} {!ppDiff &&

Calculating...

} - {ppDiff && ( -
+ */ + if (!playerId || !rank || !ppDiff) { + return ( +
+

Calculating...

+
+ ); + } + + return ( +
+
+

+ {formatNumber(ppDiff, 2)}pp until rank {formatNumber(rank)} +

+ {startedAt && (

- {formatNumber(ppDiff, 2)}pp until rank {formatNumber(rank)} + Day {formatNumber(getDaysSince(new Date(Number(startedAt))) + 1)}

- {startedAt && ( -

Day {getDaysSince(new Date(Number(startedAt))) + 1}

- )} -
- )} + )} +
); }