{"version":3,"sources":["webpack:///./src/pages/contact.js","webpack:///./src/components/animate.js","webpack:///./src/components/contact.js","webpack:///./src/components/contact.module.scss","webpack:///./src/components/animate.module.scss","webpack:///./src/pages/contact.module.scss"],"names":["ContactPage","title","className","contactStyles","section","FadeInSection","props","React","useState","isVisible","setVisible","domRef","useRef","useEffect","IntersectionObserver","entries","forEach","entry","isIntersecting","observe","current","animateStyles","fadeIn","fadeInIsVisible","ref","children","Contact","name","email","subject","message","formState","setFormState","isDisabled","setDisabled","state","useContext","ThemeContext","styleContacts","backgroundColor","theme","primary","color","text","handleChange","event","target","value","contact","style","container","type","form","formDark","method","data-netlify","data-netlify-honeypot","onSubmit","preventDefault","data","fetch","headers","body","getAttribute","Object","keys","map","key","encodeURIComponent","join","then","catch","error","alert","formFields","id","htmlFor","required","placeholder","onChange","rows","button","buttonDark","disabled","href","rel","a","aDark","module","exports"],"mappings":"8FAAA,yFAiBeA,UAXK,WAClB,OACE,kBAAC,IAAD,KACE,kBAAC,IAAD,CAAMC,MAAM,YACZ,6BAASC,UAAWC,IAAcC,SAChC,kBAAC,IAAD,U,kCCXR,8CAwBeC,IArBO,SAAAC,GAAU,IAAD,EACGC,IAAMC,UAAS,GAAxCC,EADsB,KACXC,EADW,KAEvBC,EAASJ,IAAMK,SAOrB,OANAL,IAAMM,WAAU,WACG,IAAIC,sBAAqB,SAAAC,GACxCA,EAAQC,SAAQ,SAAAC,GAAK,OAAIP,EAAWO,EAAMC,sBAEnCC,QAAQR,EAAOS,WACvB,IAED,yBACElB,UAAcmB,IAAcC,OAAnB,KACPb,EAAYY,IAAcE,gBAAkB,IAE9CC,IAAKb,GAEJL,EAAMmB,Y,oKC8IEC,IA5JC,WAAO,IAAD,EACclB,mBAAS,CACzC,CAAEmB,KAAM,GAAIC,MAAO,GAAIC,QAAS,GAAIC,QAAS,MADxCC,EADa,KACFC,EADE,OAIcxB,oBAAS,GAApCyB,EAJa,KAIDC,EAJC,KAKdC,EAAQC,qBAAWC,KACnB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,QAAQ,WACb,2BACEzB,KAAK,OACLxB,KAAK,UACLgD,GAAG,UACHE,UAAQ,EACRC,YAAY,UACZC,SAAUnC,EACVG,MAAOhB,EAAUF,WAIrB,2BAAO+C,QAAQ,WACb,8BACEzB,KAAK,OACLxB,KAAK,UACLgD,GAAG,UACHK,KAAK,IACLH,UAAQ,EACRC,YAAY,UACZC,SAAUnC,EACVG,MAAOhB,EAAUD,YAIvB,4BACE5B,UACuB,UAArBiC,EAAMK,MAAMW,KACRhD,IAAc8E,OACd9E,IAAc+E,WAEpBC,SAAUlD,EACVkB,KAAK,UAEJlB,EAAa,QAAU,cAMlC,kBAAC,IAAD,KACE,yBAAK/B,UAAWC,IAAcyB,OAC5B,+OAIc,IACZ,uBACEwD,KAAK,gCACLtC,OAAO,SACPuC,IAAI,+BACJlC,KAAK,SACLjD,UACuB,UAArBiC,EAAMK,MAAMW,KACRhD,IAAcmF,EACdnF,IAAcoF,OARtB,0BALF,U,qBCtIVC,EAAOC,QAAU,CAAC,QAAU,iCAAiC,MAAQ,+BAA+B,UAAY,mCAAmC,KAAO,8BAA8B,SAAW,kCAAkC,WAAa,oCAAoC,OAAS,gCAAgC,WAAa,oCAAoC,EAAI,2BAA2B,MAAQ,iC,qBCAvZD,EAAOC,QAAU,CAAC,OAAS,gCAAgC,gBAAkB,2C,qBCA7ED,EAAOC,QAAU,CAAC,QAAU","file":"component---src-pages-contact-js-2dc0f194c08ae2296ab3.js","sourcesContent":["import React from \"react\"\nimport Layout from \"../components/layout\"\nimport Head from \"../components/head\"\nimport Contact from \"../components/contact\"\nimport contactStyles from \"../pages/contact.module.scss\"\n\nconst ContactPage = () => {\n return (\n \n \n
\n \n
\n
\n )\n}\n\nexport default ContactPage\n","import React from \"react\"\nimport animateStyles from \"../components/animate.module.scss\"\n\nconst FadeInSection = props => {\n const [isVisible, setVisible] = React.useState(false)\n const domRef = React.useRef()\n React.useEffect(() => {\n const observer = new IntersectionObserver(entries => {\n entries.forEach(entry => setVisible(entry.isIntersecting))\n })\n observer.observe(domRef.current)\n }, [])\n return (\n \n {props.children}\n \n )\n}\n\nexport default FadeInSection\n","import React, { useState, useContext } from \"react\"\nimport contactStyles from \"../components/contact.module.scss\"\nimport { ThemeContext } from \"./ThemeProvider\"\nimport FadeInSection from \"../components/animate\"\n\nconst Contact = () => {\n const [formState, setFormState] = useState([\n { name: \"\", email: \"\", subject: \"\", message: \"\" },\n ])\n const [isDisabled, setDisabled] = useState(false)\n const state = useContext(ThemeContext)\n const styleContacts = {\n backgroundColor: state.theme.primary,\n color: state.theme.text,\n }\n\n const encode = data => {\n return Object.keys(data)\n .map(key => encodeURIComponent(key) + \"=\" + encodeURIComponent(data[key]))\n .join(\"&\")\n }\n\n const handleChange = event => {\n setFormState({ ...formState, [event.target.name]: event.target.value })\n }\n\n const handleSubmit = event => {\n event.preventDefault()\n const form = event.target\n\n fetch(\"/\", {\n method: \"POST\",\n headers: { \"Content-Type\": \"application/x-www-form-urlencoded\" },\n body: encode({\n \"form-name\": form.getAttribute(\"name\"),\n ...formState,\n }),\n })\n .then(() => setDisabled(true))\n .catch(error => alert(error))\n }\n\n return (\n
\n
\n \n \n

Contact me

\n \n
\n \n \n \n\n \n\n \n\n \n
\n \n {isDisabled ? \"Sent!\" : \"Submit\"}\n \n \n \n
\n
\n \n
\n

\n Feel free to reach out if you have any questions/suggestions, want\n my CV, think we could work together, or just want to say hello!\n Whatever it is I'd love to hear from you! Use the form or email me\n directly at{\" \"}\n \n anisa_patel@live.co.uk\n \n .\n

\n
\n
\n
\n )\n}\n\nexport default Contact\n","// extracted by mini-css-extract-plugin\nmodule.exports = {\"contact\":\"contact-module--contact--dXr_P\",\"email\":\"contact-module--email--3_uGN\",\"container\":\"contact-module--container--3Kx-_\",\"form\":\"contact-module--form--1GPPK\",\"formDark\":\"contact-module--formDark--2w2s-\",\"formFields\":\"contact-module--formFields--3kZa8\",\"button\":\"contact-module--button--2i2ax\",\"buttonDark\":\"contact-module--buttonDark--2U5wB\",\"a\":\"contact-module--a--3s5lI\",\"aDark\":\"contact-module--aDark--2o1IP\"};","// extracted by mini-css-extract-plugin\nmodule.exports = {\"fadeIn\":\"animate-module--fadeIn--3VCNf\",\"fadeInIsVisible\":\"animate-module--fadeInIsVisible--3VNfl\"};","// extracted by mini-css-extract-plugin\nmodule.exports = {\"section\":\"contact-module--section--19lI7\"};"],"sourceRoot":""}