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,0BAAQxC,UAAU,YAAYO,MAAO,CAACkC,QAAS,eAAgBC,SAAU,UACrE,sBAAInC,MAAO,CAACoC,SAAU,WAAtB,kDAKF,uBAAKpC,MAAO,CAACqC,UAAW,MAAOpC,aAAc,QAAQ,gBAAC,IAAD,QAIvD,uBAAKR,UAAU,aACZoC,EAAMS,KAAI,YAAe,IAAZ3B,EAAW,EAAXA,KAEZ,OADAqB,IAEE,gBAAC,EAAD,CACEO,IAAK5B,EAAKQ,OAAOC,KACjBoB,MAAOR,EACPrB,KAAMA,EACN8B,UAAS","sources":["webpack://gatsby-london/./src/components/signup.js","webpack://gatsby-london/./src/components/signup.module.css","webpack://gatsby-london/./src/components/postCard.js","webpack://gatsby-london/./src/pages/index.js"],"sourcesContent":["import React, {useState} from 'react';\r\nimport * as signupStyles from \"./signup.module.css\"\r\nimport { useGoogleReCaptcha } from 'react-google-recaptcha-v3'\r\nimport Helmet from \"react-helmet\"\r\n\r\nfunction validateEmail(email) {\r\n const re = /^(([^<>()\\[\\]\\\\.,;:\\s@\"]+(\\.[^<>()\\[\\]\\\\.,;:\\s@\"]+)*)|(\".+\"))@((\\[[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}\\])|(([a-zA-Z\\-0-9]+\\.)+[a-zA-Z]{2,}))$/;\r\n return re.test(String(email).toLowerCase());\r\n}\r\n \r\nexport default function Signup() {\r\n const { executeRecaptcha } = useGoogleReCaptcha()\r\n console.log('executeRecaptcha', executeRecaptcha)\r\n\r\n const [email, setEmail] = useState('');\r\n const [valid, setValid] = useState(true);\r\n const [mode, setMode] = useState(0);\r\n\r\n const handleEmailChange = (e) => setEmail(e.target.value);\r\n\r\n const handleSubmit = async (e) => {\r\n e.preventDefault();\r\n\r\n setMode(1)\r\n\r\n try {\r\n console.log(\"handleSubmit\", e)\r\n\r\n if (!executeRecaptcha) {\r\n console.log(\"!executeRecaptcha\")\r\n throw \"Not Ready\"\r\n }\r\n\r\n // VALIDATE\r\n if (!validateEmail(email)) {\r\n console.log(\"not valid\")\r\n setValid(false)\r\n setMode(0)\r\n return\r\n }\r\n\r\n const token = await executeRecaptcha('signup')\r\n console.log('token', token)\r\n\r\n const data = JSON.stringify({email, token})\r\n\r\n console.log('data', data)\r\n\r\n const submitResult = await fetch('https://cwzrokjccj.execute-api.us-east-1.amazonaws.com/001/signup', {\r\n method: 'POST',\r\n headers: {\r\n 'Accept': 'application/json, text/plain, */*',\r\n 'Content-type': 'application/json'\r\n },\r\n body: data \r\n })\r\n\r\n const finalResult = await submitResult.json()\r\n\r\n console.log('finalResult', finalResult);\r\n\r\n if(finalResult.result == \"OK\") {\r\n setMode(2)\r\n return\r\n } \r\n\r\n throw \"Unexpected Result\"\r\n \r\n } catch(e) {\r\n console.log(e)\r\n setMode(3)\r\n }\r\n };\r\n\r\n return (\r\n
\r\n \r\n \r\n \r\n {\r\n {\r\n 0:
\r\n {/*
Join my inner circle,
*/}\r\n
If you’d like emails when I make something new, sign up here.
\r\n
\r\n
\r\n
\r\n \r\n \r\n
\r\n
\r\n\r\n {!valid && Please enter a valid email address.}\r\n
\r\n {/*
*/}\r\n
,\r\n 1:
\r\n
Working...
\r\n
,\r\n 2:
\r\n
Done. Thank you for joining!
\r\n
,\r\n 3:
\r\n
Oops, unable not join, refresh and try agian.
\r\n
\r\n }[mode]\r\n }\r\n
\r\n )\r\n \r\n}\r\n","// extracted by mini-css-extract-plugin\nexport var container = \"signup-module--container--TNhyb\";\nexport var descripton = \"signup-module--descripton--lt+sc\";\nexport var done = \"signup-module--done--Jkq8n\";\nexport var emailInput = \"signup-module--emailInput--NzfMi\";\nexport var inputContainer = \"signup-module--inputContainer--MBIa7\";\nexport var inputRow = \"signup-module--inputRow--+rASG\";\nexport var oops = \"signup-module--oops--sAcT9\";\nexport var privacy = \"signup-module--privacy--qLyzf\";\nexport var submitButton = \"signup-module--submitButton--0UC4F\";\nexport var title = \"signup-module--title--gwaEE\";\nexport var validation = \"signup-module--validation--Kt9tx\";\nexport var working = \"signup-module--working--tEWS8\";","import React from \"react\"\r\nimport { Link } from \"gatsby\"\r\nimport { GatsbyImage } from \"gatsby-plugin-image\"\r\n\r\nexport default props => {\r\n const { node } = props\r\n const image = node.frontmatter.thumbnail?.childImageSharp?.gatsbyImageData\r\n\r\n return (\r\n
\r\n
\r\n \r\n {image && (\r\n \r\n )}\r\n {node.frontmatter.available === true && (\r\n Available\r\n )}\r\n \r\n
\r\n
\r\n {node.frontmatter.title}\r\n
\r\n
\r\n )\r\n}\r\n\r\n// import React from \"react\"\r\n// import { Link } from \"gatsby\"\r\n// import { GatsbyImage } from \"gatsby-plugin-image\"\r\n\r\n// export default props => (\r\n// \r\n\r\n//
\r\n// {/* You can use a GatsbyImage component if the image is dynamic */}\r\n\r\n// {props.node.frontmatter.thumbnail &&\r\n// \r\n// }\r\n\r\n// \r\n// {/* Any content here will be centered in the component */}\r\n// \r\n//
\r\n//

\r\n// {props.node.frontmatter.title || props.node.fields.slug}\r\n//

\r\n//
\r\n// \r\n//
\r\n// \r\n\r\n\r\n\r\n// \r\n// )\r\n\r\n// // ${props.count % 3 === 0 && `post-card-large`}\r\n","import React from \"react\"\r\nimport { graphql } from \"gatsby\"\r\n\r\nimport Layout from \"../components/layout\"\r\nimport SEO from \"../components/seo\"\r\nimport PostCard from \"../components/postCard\"\r\nimport Signup from \"../components/signup\"\r\n\r\nimport \"../utils/styles.css\"\r\nimport \"../utils/normalize.css\"\r\nimport \"../utils/css/screen.css\"\r\n\r\nconst BlogIndex = ({ data, location }) => {\r\n // console.error(\"Missing data:\", data)\r\n \r\n // if (!data || !data.site) {\r\n // console.error(\"Missing data:\", data)\r\n // return null // or fallback UI\r\n // }\r\n \r\n const siteTitle = data.site.siteMetadata.title\r\n const posts = data.allMarkdownRemark.edges\r\n let postCounter = 0\r\n\r\n\r\n return (\r\n \r\n \r\n \r\n
\r\n

\r\n Glad you’re here. Look around, take your time.\r\n

\r\n \r\n\r\n
\r\n
\r\n {/*
*/}\r\n\r\n
\r\n {posts.map(({ node }) => {\r\n postCounter++\r\n return (\r\n \r\n )\r\n })}\r\n
\r\n
\r\n )\r\n}\r\n\r\n\r\nexport const query = graphql`\r\n query {\r\n site {\r\n siteMetadata {\r\n title\r\n description\r\n }\r\n }\r\n\r\n allMarkdownRemark(\r\n filter: {fileAbsolutePath: {regex: \"/content/blog/\"}}\r\n sort: { fields: [frontmatter___date], order: DESC }\r\n ) {\r\n edges {\r\n node {\r\n excerpt\r\n fields {\r\n slug\r\n }\r\n frontmatter {\r\n date(formatString: \"MMMM DD, YYYY\")\r\n title\r\n description\r\n thumbnail {\r\n childImageSharp {\r\n gatsbyImageData(layout: CONSTRAINED, width: 640)\r\n }\r\n }\r\n available\r\n }\r\n }\r\n }\r\n }\r\n }\r\n`\r\n\r\nexport default BlogIndex\r\n\r\n"],"names":["validateEmail","email","test","String","toLowerCase","Signup","executeRecaptcha","useGoogleReCaptcha","console","log","useState","setEmail","valid","setValid","mode","setMode","handleSubmit","e","preventDefault","token","data","JSON","stringify","fetch","method","headers","body","submitResult","json","finalResult","result","className","Helmet","href","crossorigin","rel","type","onSubmit","style","marginBottom","name","id","value","onChange","target","placeholder","required","class","props","node","image","frontmatter","thumbnail","childImageSharp","gatsbyImageData","Link","to","fields","slug","G","alt","title","available","siteTitle","location","site","siteMetadata","posts","allMarkdownRemark","edges","postCounter","keywords","padding","maxWidth","fontSize","marginTop","map","key","count","postClass"],"sourceRoot":""}