From 3d1fc04bbf47138a7f3aa7817b5410578d46250e Mon Sep 17 00:00:00 2001 From: Frnn4268 Date: Fri, 8 Nov 2024 11:29:31 -0600 Subject: [PATCH] Adding new components for Contact.jsx page --- frontend/components/contact/ContactForm.jsx | 77 ++++++++ frontend/components/contact/ContactHeader.jsx | 17 ++ frontend/components/contact/ContactLayout.jsx | 38 ++++ frontend/src/pages/home/Contact.jsx | 173 ++++-------------- 4 files changed, 168 insertions(+), 137 deletions(-) create mode 100644 frontend/components/contact/ContactForm.jsx create mode 100644 frontend/components/contact/ContactHeader.jsx create mode 100644 frontend/components/contact/ContactLayout.jsx diff --git a/frontend/components/contact/ContactForm.jsx b/frontend/components/contact/ContactForm.jsx new file mode 100644 index 0000000..996fe0a --- /dev/null +++ b/frontend/components/contact/ContactForm.jsx @@ -0,0 +1,77 @@ +import React, { useState } from 'react'; +import { Form, Input, AutoComplete, Button, message } from 'antd'; +const { TextArea } = Input; + +const ContactForm = ({ handleSubmit }) => { + const [options, setOptions] = useState([]); + + const handleSearch = (value) => { + setOptions(() => { + if (!value || value.includes('@')) { + return []; + } + return ['gmail.com', 'hotmail.com', 'outlook.com'].map((domain) => ({ + label: `${value}@${domain}`, + value: `${value}@${domain}`, + })); + }); + }; + + return ( +
+ + + + + + + +