Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for defaultProps will be removed #360

Open
codewith-luke opened this issue Nov 23, 2023 · 0 comments
Open

Support for defaultProps will be removed #360

codewith-luke opened this issue Nov 23, 2023 · 0 comments

Comments

@codewith-luke
Copy link

codewith-luke commented Nov 23, 2023

Currently running a basic QR and when rendering the page in NextJS I am noticing the following error.

image

<QrReader
      videoId="scanner"
      constraints={{
          aspectRatio: "1",
          facingMode: "environment"
      }}
      scanDelay={250}
      onResult={(result, error) => {
          if (!!result) {
          }
      }}
      ViewFinder={() => (
          <div
              onClick={() => console.log("click")}
              style={{
                  position: "absolute",
                  top: "0",
                  left: "0",
                  right: "0",
                  bottom: "0",
                  zIndex: 10
              }}
          ></div>
      )}
      videoContainerStyle={{
          position: "relative",
          padding: 0,
          margin: "0 auto",
          border: "1px solid lightgray",
          height: "300px",
          width: "300px"
      }}
      videoStyle={{
          height: "inherit",
          width: "inherit",
          zIndex: 1
      }}
  />

The component renders on screen, however it also does not prompt for anything around video/camera access.

This exact same setup works in a Sandbox. But not within a NextJS application: https://codesandbox.io/p/sandbox/ticket-scanner-z8776t?file=%2Fsrc%2FApp.js%3A2%2C1-6%2C27

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant