mirror of
https://github.com/koreanbots/core.git
synced 2025-12-15 14:10:22 +00:00
feat: added captcha component
This commit is contained in:
parent
886f2954f2
commit
3c7fd5939a
12
components/Captcha.tsx
Normal file
12
components/Captcha.tsx
Normal file
@ -0,0 +1,12 @@
|
||||
import HCaptcha from '@hcaptcha/react-hcaptcha'
|
||||
|
||||
const Captcha = ({ dark, onVerify }:CaptchaProps):JSX.Element => {
|
||||
return <HCaptcha sitekey='43e556b4-cc90-494f-b100-378b906bb736' theme={dark ? 'dark' : 'light'} onVerify={onVerify}/>
|
||||
}
|
||||
|
||||
interface CaptchaProps {
|
||||
dark: boolean
|
||||
onVerify(token: string, eKey?: string): void
|
||||
}
|
||||
|
||||
export default Captcha
|
||||
@ -15,6 +15,7 @@
|
||||
},
|
||||
"dependencies": {
|
||||
"@fortawesome/fontawesome-free": "5.15.3",
|
||||
"@hcaptcha/react-hcaptcha": "^0.3.6",
|
||||
"@sentry/browser": "6.2.2",
|
||||
"@sentry/integrations": "6.2.2",
|
||||
"@sentry/node": "6.2.2",
|
||||
|
||||
@ -506,6 +506,11 @@
|
||||
resolved "https://registry.npmjs.org/@hapi/hoek/-/hoek-9.1.1.tgz"
|
||||
integrity sha512-CAEbWH7OIur6jEOzaai83jq3FmKmv4PmX1JYfs9IrYcGEVI/lyL1EXJGCj7eFVJ0bg5QR8LMxBlEtA+xKiLpFw==
|
||||
|
||||
"@hcaptcha/react-hcaptcha@^0.3.6":
|
||||
version "0.3.6"
|
||||
resolved "https://registry.yarnpkg.com/@hcaptcha/react-hcaptcha/-/react-hcaptcha-0.3.6.tgz#cbbb9abdaea451a4df408bc9d476e8b17f0b63f4"
|
||||
integrity sha512-DQ5nvGVbbhd2IednxRhCV9wiPcCmclEV7bH98yGynGCXzO5XftO/XC0a1M1kEf9Ee+CLO/u+1HM/uE/PSrC3vQ==
|
||||
|
||||
"@istanbuljs/load-nyc-config@^1.0.0":
|
||||
version "1.1.0"
|
||||
resolved "https://registry.npmjs.org/@istanbuljs/load-nyc-config/-/load-nyc-config-1.1.0.tgz"
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user