"use client"; import { useState, useEffect } from "react"; export default function QRCodeHelper({ clueId }) { const [qrCodes, setQrCodes] = useState([]); useEffect(() => { // Generate possible QR code formats for this clue // These are the formats that the handleScan function in the clue page can recognize if (clueId) { const id = parseInt(clueId); if (!isNaN(id)) { setQrCodes([`QR${id}`, `QR ${id}`, `${id}`, `Clue ${id}`]); } } }, [clueId]); if (!clueId || qrCodes.length === 0) { return null; } return (
If the QR scanner doesn't work, you can use any of these text codes:
{code}