diff options
| author | Rafi Zadanly <zadanlyr@gmail.com> | 2023-10-25 17:27:32 +0700 |
|---|---|---|
| committer | Rafi Zadanly <zadanlyr@gmail.com> | 2023-10-25 17:27:32 +0700 |
| commit | cf6da809621b4ebe8c9acedb035b689e7e1b60b1 (patch) | |
| tree | 5b5a80f7b13066bf3a2342242d6e4fce4b25b5b2 /src-migrate/common/components/elements/ReCaptcha.tsx | |
| parent | 90710579ba1c12060877f6ec2d26103f9c31058d (diff) | |
Update register page
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 |
