mirror of
https://github.com/mudabbir-ahmad/peworkshop.git
synced 2026-10-07 19:50:20 +00:00
added more clue buttons and positioned them correctly, need to fix elapsed timer on clue page....
This commit is contained in:
1 parent
e6f2c5446a
commit
8a06fd4966
3 files changed
+102
-21
No files matched your search
@@ -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}
|
||||
|
||||
Reference in new issue
Block a user