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

fix(unlock-app): address some types issues with captcha #13344

Merged
merged 1 commit into from
Feb 14, 2024

Conversation

clemsos
Copy link
Member

@clemsos clemsos commented Feb 14, 2024

Description

This fixes the following type issue in unlock-app

./src/components/content/event/Registration/WalletlessRegistration.tsx:268:8
Type error: 'ReCaptcha' cannot be used as a JSX component.
  Its type 'typeof ReCAPTCHA' is not a valid JSX element type.
    Type 'typeof ReCAPTCHA' is not assignable to type 'new (props: any, deprecatedLegacyContext?: any) => Component<any, any, any>'.
      Construct signature return types 'ReCAPTCHA' and 'Component<any, any, any>' are incompatible.
        The types returned by 'render()' are incompatible between these types.
          Type 'import("/home/unlock/node_modules/@types/react-dom/node_modules/@types/react/index").ReactNode' is not assignable to type 'React.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'.

  266 |       className="flex flex-col w-full gap-4"
  267 |     >
> 268 |       <ReCaptcha
      |        ^
  269 |         ref={recaptchaRef}
  270 |         sitekey={config.recaptchaKey}
  271 |         size="invisible"

Issues

Fixes #
Refs #

Checklist:

  • 1 PR, 1 purpose: my Pull Request applies to a single purpose
  • I have commented my code, particularly in hard-to-understand areas
  • I have updated the docs to reflect my changes if applicable
  • I have added tests (and stories for frontend components) that prove my fix is effective or that my feature works
  • I have performed a self-review of my own code
  • If my code involves visual changes, I am adding applicable screenshots to this thread

Release Note Draft Snippet

@clemsos clemsos merged commit 34affe2 into master Feb 14, 2024
12 checks passed
@clemsos clemsos deleted the fix-unlock-app-types branch February 14, 2024 16:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants