@@ -53,13 +53,10 @@ const Eula = ({currentEula, currentUser, acceptEula}) => {
|
|||||||
const {accepted_terms, ...otherFormValues} = formValues;
|
const {accepted_terms, ...otherFormValues} = formValues;
|
||||||
|
|
||||||
// Trim the values of the fields before submitting
|
// Trim the values of the fields before submitting
|
||||||
const trimmedFormValues = {
|
const trimmedFormValues = Object.entries(otherFormValues).reduce((acc, [key, value]) => {
|
||||||
first_name: otherFormValues.first_name.trim(),
|
acc[key] = typeof value === 'string' ? value.trim() : value;
|
||||||
last_name: otherFormValues.last_name.trim(),
|
return acc;
|
||||||
business_name: otherFormValues.business_name.trim(),
|
}, {});
|
||||||
address: otherFormValues.address.trim(),
|
|
||||||
phone_number: otherFormValues.phone_number.trim(),
|
|
||||||
};
|
|
||||||
|
|
||||||
await insertEulaAcceptance({
|
await insertEulaAcceptance({
|
||||||
variables: {
|
variables: {
|
||||||
|
|||||||
Reference in New Issue
Block a user