mirror of
https://github.com/mudabbir-ahmad/peworkshop.git
synced 2026-10-07 19:50:20 +00:00
just need to fix the map to clue function.
This commit is contained in:
1 parent
ea836179d6
commit
d675b228c6
3 files changed
+100
-37
No files matched your search
+31
-5
@@ -282,10 +282,23 @@ export default function MapPage() {
|
||||
console.log("Hunt has ended, redirecting to leaderboard");
|
||||
clearHuntTimer(); // Clean up all timer data
|
||||
|
||||
// Use the appropriate redirect method
|
||||
if (isMounted.current) {
|
||||
hardRedirect("/leaderboard?huntEnded=true");
|
||||
}
|
||||
// Show a brief message before redirecting
|
||||
const huntEndedMessage = document.createElement("div");
|
||||
huntEndedMessage.innerHTML = `
|
||||
<div style="position:fixed; top:0; left:0; right:0; bottom:0; background:rgba(0,0,0,0.8); color:white; display:flex; flex-direction:column; align-items:center; justify-content:center; z-index:9999">
|
||||
<div style="font-size:32px; margin-bottom:20px">🎯 Hunt Complete!</div>
|
||||
<div style="font-size:24px; margin-bottom:20px">The treasure hunt has ended.</div>
|
||||
<div style="font-size:18px">Redirecting to results...</div>
|
||||
</div>
|
||||
`;
|
||||
document.body.appendChild(huntEndedMessage);
|
||||
|
||||
// Use the appropriate redirect method after a short delay
|
||||
setTimeout(() => {
|
||||
if (isMounted.current) {
|
||||
hardRedirect("/leaderboard?huntEnded=true");
|
||||
}
|
||||
}, 2000);
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -302,8 +315,21 @@ export default function MapPage() {
|
||||
console.log("Timer expired, redirecting to leaderboard");
|
||||
clearHuntTimer(); // Clean up all timer data
|
||||
|
||||
// Show a brief message before redirecting
|
||||
const timerEndedMessage = document.createElement("div");
|
||||
timerEndedMessage.innerHTML = `
|
||||
<div style="position:fixed; top:0; left:0; right:0; bottom:0; background:rgba(0,0,0,0.8); color:white; display:flex; flex-direction:column; align-items:center; justify-content:center; z-index:9999">
|
||||
<div style="font-size:32px; margin-bottom:20px">⏰ Time's Up!</div>
|
||||
<div style="font-size:24px; margin-bottom:20px">The treasure hunt has ended.</div>
|
||||
<div style="font-size:18px">Redirecting to results...</div>
|
||||
</div>
|
||||
`;
|
||||
document.body.appendChild(timerEndedMessage);
|
||||
|
||||
if (isMounted.current) {
|
||||
hardRedirect("/leaderboard?huntEnded=true");
|
||||
setTimeout(() => {
|
||||
hardRedirect("/leaderboard?huntEnded=true");
|
||||
}, 2000);
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user