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AAe,CAAAb,UACdC,EAAAA,EAAAA,KAACiF,EAAAA,EAAM,CAACvG,KAAK,SAAQqB,SAAEF,EAAE,yBAQzC,G","sources":["common/utils/useForm.tsx","common/utils/validationRules.ts","components/Block/styles.ts","components/Block/index.tsx","common/Input/styles.ts","common/TextArea/styles.tsx","common/Input/index.tsx","common/TextArea/index.tsx","components/ContactForm/styles.ts","components/ContactForm/index.tsx"],"sourcesContent":["import { useState } from \"react\";\r\nimport { notification } from \"antd\";\r\n\r\ninterface IValues {\r\n name: string;\r\n email: string;\r\n message: string;\r\n}\r\n\r\nconst initialValues: IValues = {\r\n name: \"\",\r\n email: \"\",\r\n message: \"\",\r\n};\r\n\r\nexport const useForm = (validate: { (values: IValues): IValues }) => {\r\n const [formState, setFormState] = useState<{\r\n values: IValues;\r\n errors: IValues;\r\n }>({\r\n values: { ...initialValues },\r\n errors: { ...initialValues },\r\n });\r\n\r\n const handleSubmit = async (event: React.ChangeEvent) => {\r\n event.preventDefault();\r\n const values = formState.values;\r\n const errors = validate(values);\r\n setFormState((prevState) => ({ ...prevState, errors }));\r\n\r\n const url = \"\"; // Fill in your API URL here\r\n\r\n try {\r\n if (Object.values(errors).every((error) => error === \"\")) {\r\n const response = await fetch(url, {\r\n method: \"POST\",\r\n headers: {\r\n \"Content-Type\": \"application/json\",\r\n },\r\n body: JSON.stringify(values),\r\n });\r\n\r\n if (!response.ok) {\r\n notification[\"error\"]({\r\n message: \"Error\",\r\n description:\r\n \"There was an error sending your message, please try again later.\",\r\n });\r\n } else {\r\n event.target.reset();\r\n setFormState(() => ({\r\n values: { ...initialValues },\r\n errors: { ...initialValues },\r\n }));\r\n\r\n notification[\"success\"]({\r\n message: \"Success\",\r\n description: \"Your message has been sent!\",\r\n });\r\n }\r\n }\r\n } catch (error) {\r\n notification[\"error\"]({\r\n message: \"Error\",\r\n description: \"Failed to submit form. Please try again later.\",\r\n });\r\n }\r\n };\r\n\r\n const handleChange = (\r\n event: React.ChangeEvent\r\n ) => {\r\n event.persist();\r\n const { name, value } = event.target;\r\n setFormState((prevState) => ({\r\n ...prevState,\r\n values: {\r\n ...prevState.values,\r\n [name]: value,\r\n },\r\n errors: {\r\n ...prevState.errors,\r\n [name]: \"\",\r\n },\r\n }));\r\n };\r\n\r\n return {\r\n handleChange,\r\n handleSubmit,\r\n values: formState.values,\r\n errors: formState.errors,\r\n };\r\n};\r\n","import { validateProps } from \"../../common/types\";\r\n\r\nexport default function validate(values: validateProps) {\r\n let errors = {} as validateProps;\r\n\r\n if (!values.name) {\r\n errors.name = \"Name is required\";\r\n }\r\n if (!values.email) {\r\n errors.email = \"Email address is required\";\r\n } else if (!/\\S+@\\S+\\.\\S+/.test(values.email)) {\r\n errors.email = \"Email address is invalid\";\r\n }\r\n if (!values.message) {\r\n errors.message = \"Message is required\";\r\n }\r\n return errors;\r\n}\r\n","import styled from \"styled-components\";\r\n\r\nexport const Content = styled(\"p\")`\r\n margin-top: 1.5rem;\r\n`;\r\n\r\nexport const Container = styled(\"div\")`\r\n position: relative;\r\n max-width: 700px;\r\n`;\r\n\r\nexport const TextWrapper = styled(\"div\")`\r\n border-radius: 3rem;\r\n max-width: 400px;\r\n`;\r\n","import { withTranslation, TFunction } from \"react-i18next\";\r\nimport { Container, TextWrapper, Content } from \"./styles\";\r\n\r\ninterface Props {\r\n title: string;\r\n content: string;\r\n t: TFunction;\r\n}\r\n\r\nconst Block = ({ title, content, t }: Props) => {\r\n return (\r\n \r\n
{t(title)}
\r\n \r\n {t(content)}\r\n \r\n
\r\n );\r\n};\r\n\r\nexport default withTranslation()(Block);\r\n","import styled from \"styled-components\";\r\n\r\nexport const Container = styled(\"div\")`\r\n display: inline-block;\r\n width: 100%;\r\n padding: 10px 5px;\r\n`;\r\n\r\nexport const StyledInput = styled(\"input\")`\r\n font-size: 0.875rem;\r\n`;\r\n","import styled from \"styled-components\";\r\n\r\nexport const StyledContainer = styled(\"div\")`\r\n display: inline-block;\r\n width: 100%;\r\n padding: 10px 5px;\r\n margin-bottom: -0.625rem;\r\n`;\r\n\r\nexport const StyledTextArea = styled(\"textarea\")`\r\n resize: none;\r\n font-size: 0.875rem;\r\n height: 185px;\r\n`;\r\n\r\nexport const Label = styled(\"label\")`\r\n display: block;\r\n padding-bottom: 10px;\r\n text-transform: capitalize;\r\n`;\r\n","import { withTranslation } from \"react-i18next\";\r\nimport { Container, StyledInput } from \"./styles\";\r\nimport { Label } from \"../TextArea/styles\";\r\nimport { InputProps } from \"../types\";\r\n\r\nconst Input = ({ name, placeholder, onChange, t }: InputProps) => (\r\n \r\n \r\n \r\n \r\n);\r\n\r\nexport default withTranslation()(Input);\r\n","import { withTranslation } from \"react-i18next\";\r\nimport { StyledTextArea, StyledContainer, Label } from \"./styles\";\r\nimport { InputProps } from \"../types\";\r\n\r\nconst TextArea = ({ name, placeholder, onChange, t }: InputProps) => (\r\n \r\n \r\n \r\n \r\n);\r\n\r\nexport default withTranslation()(TextArea);\r\n","import styled from \"styled-components\";\r\n\r\nexport const ContactContainer = styled(\"div\")`\r\n padding: 5rem 0;\r\n\r\n @media only screen and (max-width: 1024px) {\r\n padding: 3rem 0;\r\n }\r\n`;\r\n\r\nexport const FormGroup = styled(\"form\")`\r\n width: 100%;\r\n max-width: 520px;\r\n\r\n @media only screen and (max-width: 1045px) {\r\n max-width: 100%;\r\n margin-top: 2rem;\r\n }\r\n`;\r\n\r\nexport const Span = styled(\"span\")`\r\n display: block;\r\n font-weight: 600;\r\n color: rgb(255, 130, 92);\r\n height: 0.775rem;\r\n padding: 0 0.675rem;\r\n`;\r\n\r\nexport const ButtonContainer = styled(\"div\")`\r\n text-align: end;\r\n position: relative;\r\n\r\n @media only screen and (max-width: 414px) {\r\n padding-top: 0.75rem;\r\n }\r\n`;\r\n","import { Row, Col } from \"antd\";\r\nimport { withTranslation } from \"react-i18next\";\r\nimport { Slide } from \"react-awesome-reveal\";\r\nimport { ContactProps, ValidationTypeProps } from \"./types\";\r\nimport { useForm } from \"../../common/utils/useForm\";\r\nimport validate from \"../../common/utils/validationRules\";\r\nimport { Button } from \"../../common/Button\";\r\nimport Block from \"../Block\";\r\nimport Input from \"../../common/Input\";\r\nimport TextArea from \"../../common/TextArea\";\r\nimport { ContactContainer, FormGroup, Span, ButtonContainer } from \"./styles\";\r\n\r\nconst Contact = ({ title, content, id, t }: ContactProps) => {\r\n const { values, errors, handleChange, handleSubmit } = useForm(validate);\r\n\r\n const ValidationType = ({ type }: ValidationTypeProps) => {\r\n const ErrorMessage = errors[type as keyof typeof errors];\r\n return {ErrorMessage};\r\n };\r\n\r\n return (\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n );\r\n};\r\n\r\nexport default withTranslation()(Contact);\r\n"],"names":["initialValues","name","email","message","validate","values","errors","test","Content","styled","_templateObject","_taggedTemplateLiteral","Container","_templateObject2","TextWrapper","_templateObject3","withTranslation","_ref","title","content","t","_jsxs","children","_jsx","StyledInput","StyledContainer","StyledTextArea","Label","placeholder","onChange","htmlFor","id","ContactContainer","FormGroup","Span","ButtonContainer","_templateObject4","_useForm","_useState","useState","_objectSpread","_useState2","_slicedToArray","formState","setFormState","handleSubmit","_asyncToGenerator","_regeneratorRuntime","mark","_callee","event","wrap","_context","prev","next","preventDefault","prevState","Object","every","error","fetch","method","headers","body","JSON","stringify","sent","ok","target","reset","notification","description","t0","stop","_x","apply","arguments","handleChange","persist","_event$target","value","_defineProperty","useForm","ValidationType","_ref2","type","ErrorMessage","Row","justify","align","Col","lg","md","sm","xs","Slide","direction","triggerOnce","Block","autoComplete","onSubmit","span","Input","TextArea","Button"],"sourceRoot":""}