fixed map display and fixed some routing issues for if the hunt timer runs out.

Grey = cant click
Red = current
Green = complete
blue = skipped?
This commit is contained in:
bobbert committed 2025-03-15 20:13:00 +00:00
1 parent 0afa6817a8
commit 6d1cbe9195
5 files changed
+67 -27

No files matched your search

+16 -1
View File
@@ -17,6 +17,7 @@ export default function WaitingPage() {
useEffect(() => {
let redirectAttempted = false;
let lastKnownHuntStatus = false;
let lastHuntData = null;
async function checkHuntStatus() {
if (redirectAttempted) return;
@@ -102,8 +103,22 @@ export default function WaitingPage() {
return;
}
// If this is a new session but we detect signs of a hunt that ended
if (!lastHuntData && !data.active && data.startTime && data.endTime) {
// Handle case where user lands directly on waiting page after hunt ended
console.log("Hunt appears to have already ended");
setHuntEnded(true);
// Redirect to leaderboard after a brief delay
setTimeout(() => {
window.location.href = "/leaderboard?huntEnded=true";
}, 2000);
return;
}
// Save the current hunt data for next comparison
setLastHuntData(data);
lastHuntData = data;
if (data.active) {
// Store the global start time in the centralized timer service