add usage instead of saying missing values
All checks were successful
Publish / deploy (push) Successful in 44s

This commit is contained in:
Lee 2023-11-22 15:42:29 +00:00
parent 58149a8061
commit 394e65d0da

View File

@ -53,25 +53,24 @@ export default function Home() {
setInterval(updateRank, 1000 * 60 * 1); // update every minute
}, [mounted, updateRank]);
if (!playerId) {
if (!playerId || !rank) {
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 className="text-xl p-2 text-black">
<p>
Usage:{" "}
<span className="text-blue-500">
<a href="https://git.fascinated.cc/Fascinated/scoresaber-pp-to-rank-overlay#usage">
https://git.fascinated.cc/Fascinated/scoresaber-pp-to-rank-overlay#usage
</a>
</span>
</p>
</main>
);
}
if (!ppDiff) {
return (
<main className="text-xl text-white">
<main className="text-xl p-2 text-white">
<p>Calculating...</p>
</main>
);