core/components/Captcha.tsx
SKINMAKER b421d1ab64
chore: apply prettier (#637)
* chore: apply prettier

* chore: edit ready comment

* chore: move ts comment
2023-11-29 22:04:33 +09:00

21 lines
421 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