diff --git a/src/components/ContactUs.jsx b/src/components/ContactUs.jsx
index 024efca..27b0469 100644
--- a/src/components/ContactUs.jsx
+++ b/src/components/ContactUs.jsx
@@ -10,13 +10,20 @@ const ContactUs = () => {
const [email, setEmail] = useState("")
const [message, setMessage] = useState("")
const [name, setName] = useState("")
+ const [number, setNumber] = useState("")
const handleSubmit = (e) => {
e.preventDefault()
- if(!name.trim() || !message.trim() || !email.trim()){
+ if(!name.trim() || !message.trim() || !email.trim() || !number.trim()){
alert("Fill all the fields")
}
- alert("Message sent successfully")
+ else if(name.trim() || message.trim() || email.trim() || number.trim()){
+ alert("Message sent successfully")
+ setName("")
+ setMessage("")
+ setEmail("")
+ setNumber("")
+ }
}
@@ -58,7 +65,9 @@ const ContactUs = () => {
{
setEmail(e.target.value)
}} className="rounded-xl h-10 w-72 p-3" placeholder="Email: eg- Elon@gmail.com"/>
-
+ {
+ setNumber(e.target.value)
+ }} className="rounded-xl h-10 w-72 p-3" placeholder="Phone no.: eg- 65654-56554"/>