This commit is contained in:
parent
2fc7257929
commit
58149a8061
@ -53,12 +53,23 @@ export default function Home() {
|
||||
setInterval(updateRank, 1000 * 60 * 1); // update every minute
|
||||
}, [mounted, updateRank]);
|
||||
|
||||
/**
|
||||
* {!playerId && <p>Invalid player ID</p>}
|
||||
{!rank && <p>Invalid rank</p>}
|
||||
{!ppDiff && <p>Calculating...</p>}
|
||||
*/
|
||||
if (!playerId || !rank || !ppDiff) {
|
||||
if (!playerId) {
|
||||
return (
|
||||
<main className="text-xl text-white">
|
||||
<p>Invalid or missing player ID</p>
|
||||
</main>
|
||||
);
|
||||
}
|
||||
|
||||
if (!rank) {
|
||||
return (
|
||||
<main className="text-xl text-white">
|
||||
<p>Invalid or missing rank</p>
|
||||
</main>
|
||||
);
|
||||
}
|
||||
|
||||
if (!ppDiff) {
|
||||
return (
|
||||
<main className="text-xl text-white">
|
||||
<p>Calculating...</p>
|
||||
|
Loading…
x
Reference in New Issue
Block a user