diff --git a/app/(main)/clue/[clueId]/page.js b/app/(main)/clue/[clueId]/page.js
index e9f5ef2..692e712 100644
--- a/app/(main)/clue/[clueId]/page.js
+++ b/app/(main)/clue/[clueId]/page.js
@@ -439,7 +439,10 @@ export default function CluePage({ params }) {
{/* Map Banner with team info and timer */}
-
{teamData?.team?.name || "Loading..."}
+
+ Team Name:
+ {teamData?.team?.name || "Loading..."}
+
{elapsedTime}
@@ -859,6 +862,11 @@ export default function CluePage({ params }) {
padding-right: 5px;
}
+ .team-label {
+ font-weight: normal;
+ opacity: 0.9;
+ }
+
.elapsed-time {
text-align: center;
padding: 5px 10px;
@@ -874,7 +882,7 @@ export default function CluePage({ params }) {
}
.team-code {
- font-size: 16px;
+ font-size: 18px; /* Increased from 16px to 18px */
font-weight: bold;
flex: 1;
text-align: right;
@@ -883,11 +891,6 @@ export default function CluePage({ params }) {
text-overflow: ellipsis;
padding-left: 5px;
}
-
- /* Remove the standalone timer display as it's now in the banner */
- .timer-display {
- display: none;
- }
`}
);
diff --git a/clue_hunt.db b/clue_hunt.db
index f87b39e..48785db 100644
Binary files a/clue_hunt.db and b/clue_hunt.db differ
diff --git a/components/EnhancedQRScanner.js b/components/EnhancedQRScanner.js
index 1a1c502..b462959 100644
--- a/components/EnhancedQRScanner.js
+++ b/components/EnhancedQRScanner.js
@@ -18,14 +18,14 @@ export default function EnhancedQRScanner({
const [torchEnabled, setTorchEnabled] = useState(false);
const inputRef = useRef(null);
const [cameraPermissionDenied, setCameraPermissionDenied] = useState(false);
-
- // Define video constraints explicitly
+
+ // Define video constraints explicitly
const videoConstraints = {
facingMode: "environment",
width: { min: 640, ideal: 1280, max: 1920 },
height: { min: 480, ideal: 720, max: 1080 },
};
-
+
// Setup the zxing scanner hook with explicit video constraints
const { ref, torch } = useZxing({
onDecodeResult(result) {
@@ -56,18 +56,18 @@ export default function EnhancedQRScanner({
if (!navigator.mediaDevices || !navigator.mediaDevices.getUserMedia) {
throw new Error("MediaDevices API is not supported in this browser");
}
-
+
// Explicitly request video permission - important to avoid the error
- const stream = await navigator.mediaDevices.getUserMedia({
+ const stream = await navigator.mediaDevices.getUserMedia({
video: true,
- audio: false
+ audio: false,
});
-
+
// If we got a stream, we have permission - release it immediately
if (stream) {
- stream.getTracks().forEach(track => track.stop());
+ stream.getTracks().forEach((track) => track.stop());
}
-
+
// Now enumerate devices to confirm we have video devices
const devices = await navigator.mediaDevices.enumerateDevices();
const videoDevices = devices.filter(
@@ -87,15 +87,20 @@ export default function EnhancedQRScanner({
setInitialized(true);
} catch (err) {
console.error("Camera access error:", err);
-
+
// Handle permission denied specifically
- if (err.name === "NotAllowedError" || err.name === "PermissionDeniedError") {
+ if (
+ err.name === "NotAllowedError" ||
+ err.name === "PermissionDeniedError"
+ ) {
setCameraPermissionDenied(true);
- setError("Camera permission denied. Please allow camera access in your browser settings.");
+ setError(
+ "Camera permission denied. Please allow camera access in your browser settings."
+ );
} else {
setError(`Camera error: ${err.message}`);
}
-
+
setInitialized(true);
}
}
@@ -125,7 +130,7 @@ export default function EnhancedQRScanner({
// Show success visual
setScanSuccess(true);
setTimeout(() => setScanSuccess(false), 1500);
-
+
// Call the onScan callback with the decoded text
onScan(text);
} catch (err) {
@@ -137,17 +142,17 @@ export default function EnhancedQRScanner({
const requestCameraAccess = async () => {
try {
setError(null);
-
+
// Explicitly request video permission
- const stream = await navigator.mediaDevices.getUserMedia({
+ const stream = await navigator.mediaDevices.getUserMedia({
video: true,
- audio: false
+ audio: false,
});
-
+
// If we got a stream, we have permission
if (stream) {
// Release the stream since useZxing will request it again
- stream.getTracks().forEach(track => track.stop());
+ stream.getTracks().forEach((track) => track.stop());
setCameraActive(true);
setCameraPermissionDenied(false);
}
@@ -244,16 +249,13 @@ export default function EnhancedQRScanner({
Select "Allow" for camera access
Refresh this page
-
) : (
-