diff options
Diffstat (limited to 'src-migrate/common/components/elements/ReCaptcha.tsx')
| -rw-r--r-- | src-migrate/common/components/elements/ReCaptcha.tsx | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/src-migrate/common/components/elements/ReCaptcha.tsx b/src-migrate/common/components/elements/ReCaptcha.tsx new file mode 100644 index 00000000..1bc31d90 --- /dev/null +++ b/src-migrate/common/components/elements/ReCaptcha.tsx @@ -0,0 +1,17 @@ +import ReCAPTCHA, { ReCAPTCHAProps } from "react-google-recaptcha" + +const GOOGLE_RECAPTCHA_KEY = process.env.NEXT_PUBLIC_RECAPTCHA_GOOGLE || '' + +type Props = Omit<ReCAPTCHAProps, 'sitekey'> & { + sitekey?: string; +} + +const ReCaptcha = (props: Props) => { + const { sitekey, ...rest } = props + + return ( + <ReCAPTCHA sitekey={sitekey || GOOGLE_RECAPTCHA_KEY} {...rest} /> + ) +} + +export default ReCaptcha
\ No newline at end of file |
