fix missing values messages
All checks were successful
Publish / deploy (push) Successful in 1m32s

This commit is contained in:
Lee 2023-11-22 15:38:04 +00:00
parent 2fc7257929
commit 58149a8061

@ -53,12 +53,23 @@ export default function Home() {
setInterval(updateRank, 1000 * 60 * 1); // update every minute setInterval(updateRank, 1000 * 60 * 1); // update every minute
}, [mounted, updateRank]); }, [mounted, updateRank]);
/** if (!playerId) {
* {!playerId && <p>Invalid player ID</p>} return (
{!rank && <p>Invalid rank</p>} <main className="text-xl text-white">
{!ppDiff && <p>Calculating...</p>} <p>Invalid or missing player ID</p>
*/ </main>
if (!playerId || !rank || !ppDiff) { );
}
if (!rank) {
return (
<main className="text-xl text-white">
<p>Invalid or missing rank</p>
</main>
);
}
if (!ppDiff) {
return ( return (
<main className="text-xl text-white"> <main className="text-xl text-white">
<p>Calculating...</p> <p>Calculating...</p>