ReCaptcha.tsx 595 B

1234567891011121314151617181920212223242526
  1. import { Flex } from "reflexbox/styled-components";
  2. import styled from "styled-components";
  3. import getConfig from "next/config";
  4. import React from "react";
  5. const { publicRuntimeConfig } = getConfig();
  6. const ReCaptcha = () => {
  7. if (process.env.NODE_ENV !== "production") {
  8. return null;
  9. }
  10. return (
  11. <Flex
  12. margin="54px 0 16px"
  13. id="g-recaptcha"
  14. className="g-recaptcha"
  15. data-sitekey={publicRuntimeConfig.RECAPTCHA_SITE_KEY}
  16. data-callback="recaptchaCallback"
  17. data-size="invisible"
  18. data-badge="inline"
  19. />
  20. );
  21. };
  22. export default ReCaptcha;