kitcc-org / kitcc-library

KITCCが所有する書籍を管理するWebアプリ
https://kitcc-library-web.pages.dev/
MIT License
1 stars 0 forks source link

JANコードからISBNを読み取れるようにする #46

Open kimurash opened 1 month ago

Kosei805 commented 1 month ago
Kosei805 commented 1 month ago

https://www.npmjs.com/package/react-qr-barcode-scanner

このコンポーネントを使おうとしたところ、

'BarcodeScannerComponent' cannot be used as a JSX component.
  Its type '({ onUpdate, onError, width, height, facingMode, torch, delay, videoConstraints, stopStream, }: { onUpdate: (arg0: unknown, arg1?: Result | undefined) => void; onError?: ((arg0: string | DOMException) => void) | undefined; width?: string | number | undefined; ... 5 more ...; stopStream?: boolean | undefined; }) => R...' is not a valid JSX element type.
    Type '({ onUpdate, onError, width, height, facingMode, torch, delay, videoConstraints, stopStream, }: { onUpdate: (arg0: unknown, arg1?: Result | undefined) => void; onError?: ((arg0: string | DOMException) => void) | undefined; width?: string | number | undefined; ... 5 more ...; stopStream?: boolean | undefined; }) => R...' is not assignable to type '(props: any) => ReactNode'.
      Type 'ReactElement<any, string | JSXElementConstructor<any>>' is not assignable to type 'ReactNode'.
        Property 'children' is missing in type 'ReactElement<any, string | JSXElementConstructor<any>>' but required in type 'ReactPortal'.

こんな感じのエラーが出てきた

Kosei805 commented 1 month ago

一回別のissueをやることにします