redo of entire app

This commit is contained in:
bobbert committed 2025-03-11 16:22:47 +00:00
1 parent 7dee4879a7
commit 093dd7ea9e
45 files changed
+686 -5659

No files matched your search

+30
View File
@@ -0,0 +1,30 @@
'use client'; // Mark as a Client Component
import { useState } from 'react';
import QrReader from 'react-qr-reader';
export default function QRScanner({ onScan }) {
const [result, setResult] = useState('');
const handleScan = (data) => {
if (data) {
setResult(data);
onScan(parseInt(data, 10));
}
};
const handleError = (err) => {
console.error(err);
};
return (
<div>
<QrReader
delay={300}
onError={handleError}
onScan={handleScan}
style={{ width: '100%' }}
/>
<p>{result}</p>
</div>
);
}