Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add captcha #1120

Closed
wants to merge 6 commits into from
Closed

Add captcha #1120

wants to merge 6 commits into from

Conversation

Too-Far
Copy link

@Too-Far Too-Far commented May 8, 2020

Description of changes

This adds the recaptcha to the bottom of the Join page. Instantiated in _app.js, component created in ReCaptcha.js and placed on join.js. Followed the directions here.

Issue Resolved

Fixes #1117

Screenshots/GIFs

@vercel
Copy link

vercel bot commented May 8, 2020

This pull request is being automatically deployed with Vercel (learn more).
To see the status of your deployment, click below or on the icon next to each commit.

🔍 Inspect: https://vercel.com/operation-code/operation-code/6l7bjwa18
✅ Preview: https://operation-code-git-fork-too-far-add-captcha.operation-code.now.sh

@kylemh
Copy link
Member

kylemh commented May 8, 2020

@kylemh
Copy link
Member

kylemh commented May 8, 2020

🤖 This is a bot 🤖

🎉 Deployed Storybook preview! 🎉

Click the link at the bottom of this comment to see it live.

Built with commit 8926b49

https://deploy-preview-1120--operation-code-storybook.netlify.app

@vercel vercel bot temporarily deployed to Preview May 9, 2020 00:17 Inactive
Copy link
Member

@kylemh kylemh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@@ -60,6 +61,8 @@ class OperationCodeApp extends App {
componentDidMount() {
/* Analytics */
// TODO: Leverage master-build-time-only env vars instead of window check
loadReCaptcha();
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh we won't wanna load this for every page. _app is like the middleware for every page's client run-time. It looks like we'll wanna call this function in the page that I asked for via:

useEffect(() => {
  loadReCaptcha();
}, []);

Check this out: https://reactjs.org/docs/hooks-effect.html

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok awesome! I remembered seeing that. I just couldn’t recall. Thanks!

@Too-Far Too-Far closed this May 9, 2020
@Too-Far Too-Far deleted the add-captcha branch May 9, 2020 01:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Integrate Google Captcha to prevent bogus form entries
2 participants