chore: set sitekey with .env (#539)

* chore: set sitekey with .env

* fix: typo

* chore: make variable public

* chore: add config to demo env
This commit is contained in:
SKINMAKER 2023-03-12 22:27:58 +09:00 committed by GitHub
parent 3e8aa26018
commit 1fe95bbed3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 2 deletions

View File

@ -21,4 +21,6 @@ GITHUB_CLIENT_SECRET=GH_CLIENT_SECRET
CSRF_SECRET=CSRF_SECRET CSRF_SECRET=CSRF_SECRET
DD_TRACE_DEBUG=true DD_TRACE_DEBUG=true
DD_TRACE_ENABLED=true DD_TRACE_ENABLED=true
NEXT_PUBLIC_HCAPTCHA_SITEKEY=HCAPTCHA_SITEKEY

View File

@ -3,7 +3,7 @@ import HCaptcha from '@hcaptcha/react-hcaptcha'
const Captcha: React.FC<CaptchaProps> = ({ dark, onVerify }) => { const Captcha: React.FC<CaptchaProps> = ({ dark, onVerify }) => {
return <HCaptcha sitekey='43e556b4-cc90-494f-b100-378b906bb736' theme={dark ? 'dark' : 'light'} onVerify={onVerify}/> return <HCaptcha sitekey={process.env.NEXT_PUBLIC_HCAPTCHA_SITEKEY} theme={dark ? 'dark' : 'light'} onVerify={onVerify}/>
} }
interface CaptchaProps { interface CaptchaProps {