mirror of
https://github.com/koreanbots/core.git
synced 2025-12-15 14:10:22 +00:00
* chore: set sitekey with .env * fix: typo * chore: make variable public * chore: add config to demo env
15 lines
405 B
TypeScript
15 lines
405 B
TypeScript
import { Ref } from 'react'
|
|
import HCaptcha from '@hcaptcha/react-hcaptcha'
|
|
|
|
|
|
const Captcha: React.FC<CaptchaProps> = ({ dark, onVerify }) => {
|
|
return <HCaptcha sitekey={process.env.NEXT_PUBLIC_HCAPTCHA_SITEKEY} theme={dark ? 'dark' : 'light'} onVerify={onVerify}/>
|
|
}
|
|
|
|
interface CaptchaProps {
|
|
dark: boolean
|
|
onVerify(token: string, eKey?: string): void
|
|
ref?: Ref<HCaptcha>
|
|
}
|
|
|
|
export default Captcha |