lint extravaganza

This commit is contained in:
Paul Miller
2023-05-23 19:03:52 -05:00
parent 6ee7bd068b
commit c937bcbf9e
36 changed files with 1206 additions and 1216 deletions

View File

@@ -7,13 +7,15 @@ export default function Scanner(props: { onResult: (result: string) => void }) {
// TODO: not sure it's appropriate to use a signal for this but it works!
const [scanner, setScanner] = createSignal<QrScanner | null>(null);
const handleResult = (result: { data: string }) => {
props.onResult(result.data);
}
onMount(() => {
if (container) {
const newScanner = new QrScanner(
container,
(result: { data: string }) => {
props.onResult(result.data);
},
handleResult,
{
returnDetailedScanResult: true,
}