Made the contact page input name to accept both first and last name

This commit was merged in pull request #57.
This commit is contained in:
VICTOR\anumu
2023-01-23 20:32:14 +01:00
parent 623dc8164b
commit 84eacb05d7
2 changed files with 8 additions and 7 deletions
+6 -5
View File
@@ -110,6 +110,7 @@ const Main = ({ brdcum }) => {
} }
}) })
.catch((error) => { .catch((error) => {
errText.textContent = "unable to send your message, please try again"
console.log(error); console.log(error);
}); });
}; };
@@ -119,9 +120,9 @@ const Main = ({ brdcum }) => {
allCountry().then((data) => setCountries(Object.values(data.data))); allCountry().then((data) => setCountries(Object.values(data.data)));
}, []); }, []);
useEffect(() => { // useEffect(() => {
myData // myData
}, [myData]); // }, [myData]);
return ( return (
<> <>
@@ -195,12 +196,12 @@ const Main = ({ brdcum }) => {
name="name" name="name"
type="text" type="text"
placeholder="Name" placeholder="Name"
errorMessage="Please enter your name" errorMessage="Please enter your first and last name. (e.g: Mark John)"
required={true} required={true}
maxLenght={35} maxLenght={35}
value={values.name} value={values.name}
onChange={onChange} onChange={onChange}
pattern="^[A-Za-z]{1,35}$" pattern="^$|^[a-zA-Z]+( [a-zA-Z]+)?$+( [a-zA-Z]+)?$"
/> />
<FormInput <FormInput
+2 -2
View File
@@ -16,8 +16,8 @@ class SiteService {
} }
// Contact Data{POST} // Contact Data{POST}
contactData() { contactData(value) {
return this.postAuxEnd("/contact", null) return this.postAuxEnd("/contact", value)
} }
faqData() { faqData() {