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:
@@ -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
|
||||||
|
|||||||
Vendored
+2
-2
@@ -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() {
|
||||||
|
|||||||
Reference in New Issue
Block a user