Skip to content

Commit

Permalink
feat: setup ReCaptcha
Browse files Browse the repository at this point in the history
  • Loading branch information
martapanc committed Feb 16, 2024
1 parent e75d827 commit 1d1f673
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 3 additions & 1 deletion src/components/molecules/ContactForm/ContactForm.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,9 @@ const ContactForm = () => {
.then(() => {
setIsVerified(true);
})
.catch(() => {
.catch((err) => {
// eslint-disable-next-line no-console
console.log(err);
setIsVerified(false);
setError(true);
});
Expand Down
2 changes: 1 addition & 1 deletion src/lib/verifyCaptcha.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ export interface ReCaptchaResp {
}

export async function verifyCaptcha(token: string | null) {
const key = process.env.RECAPTCHA_SECRET_KEY;
const key = process.env.NEXT_PUBLIC_RECAPTCHA_KEY as string;

if (!key) {
throw new Error('Error retrieving reCaptcha secret key.');
Expand Down

0 comments on commit 1d1f673

Please sign in to comment.