added more clue buttons and positioned them correctly, need to fix elapsed timer on clue page....

This commit is contained in:
bobbert committed 2025-03-17 13:28:55 +00:00
1 parent e6f2c5446a
commit 8a06fd4966
3 files changed
+102 -21

No files matched your search

+14 -3
View File
@@ -359,6 +359,12 @@ export default function CluePage({ params }) {
"✅ Clue verified! You can now proceed to the next clue."
);
// Make next clue available immediately
setNextClueAvailable(true);
// Force a refresh of the clue data to update availability
setLastRefresh(0);
// Show success notification
setShowSuccessNotification(true);
@@ -395,8 +401,8 @@ export default function CluePage({ params }) {
// Navigate to the next clue
const handleNextClue = () => {
if (nextClueId) {
// Check if next clue is available before navigating
if (nextClueAvailable || isAdmin) {
// Always allow navigation if current clue is found
if (clueFound || nextClueAvailable || isAdmin) {
router.push(`/clue/${nextClueId}`);
} else {
// Show notification that the next clue is locked
@@ -561,7 +567,12 @@ export default function CluePage({ params }) {
{/* QR Scanner Section */}
<div className="scanner-section">
<h2>Scan QR Code</h2>
<EnhancedQRScanner onScan={handleScan} width={280} height={280} />
<EnhancedQRScanner
onScan={handleScan}
width={280}
height={280}
disableTorch={true} // Disable torch functionality
/>
{scanMessage && (
<div className={`scan-message ${clueFound ? "success" : ""}`}>
{scanMessage}