@saasquatch/mint-components 1.14.6-8 → 1.14.6-9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1329,7 +1329,7 @@ function useLeadForm(props) {
1329
1329
  };
1330
1330
  }, [formRef.current]);
1331
1331
  const submit = async (event) => {
1332
- var _a, _b;
1332
+ var _a, _b, _c, _d;
1333
1333
  let formControls = event.target.getFormControls();
1334
1334
  let formData = {};
1335
1335
  let validationErrors = {};
@@ -1366,10 +1366,10 @@ function useLeadForm(props) {
1366
1366
  key: props.formKey,
1367
1367
  formData,
1368
1368
  };
1369
- const result = await submitLead({ formSubmissionInput: variables });
1370
1369
  try {
1370
+ const result = await submitLead({ formSubmissionInput: variables });
1371
1371
  console.log({
1372
- success: result.data.submitForm.success,
1372
+ success: (_b = (_a = result === null || result === void 0 ? void 0 : result.data) === null || _a === void 0 ? void 0 : _a.submitForm) === null || _b === void 0 ? void 0 : _b.success,
1373
1373
  isError: result instanceof Error,
1374
1374
  });
1375
1375
  if (result instanceof Error) {
@@ -1380,11 +1380,12 @@ function useLeadForm(props) {
1380
1380
  error: "",
1381
1381
  validationErrors: {},
1382
1382
  });
1383
- if ((_b = (_a = result === null || result === void 0 ? void 0 : result.data) === null || _a === void 0 ? void 0 : _a.submitForm) === null || _b === void 0 ? void 0 : _b.success) {
1383
+ if ((_d = (_c = result === null || result === void 0 ? void 0 : result.data) === null || _c === void 0 ? void 0 : _c.submitForm) === null || _d === void 0 ? void 0 : _d.success) {
1384
1384
  setSuccess(true);
1385
1385
  }
1386
1386
  }
1387
1387
  catch (error) {
1388
+ console.log({ error });
1388
1389
  setLeadFormState({
1389
1390
  loading: false,
1390
1391
  error: props.networkErrorMessage,
@@ -40,7 +40,7 @@ export function useLeadForm(props) {
40
40
  };
41
41
  }, [formRef.current]);
42
42
  const submit = async (event) => {
43
- var _a, _b;
43
+ var _a, _b, _c, _d;
44
44
  let formControls = event.target.getFormControls();
45
45
  let formData = {};
46
46
  let validationErrors = {};
@@ -77,10 +77,10 @@ export function useLeadForm(props) {
77
77
  key: props.formKey,
78
78
  formData,
79
79
  };
80
- const result = await submitLead({ formSubmissionInput: variables });
81
80
  try {
81
+ const result = await submitLead({ formSubmissionInput: variables });
82
82
  console.log({
83
- success: result.data.submitForm.success,
83
+ success: (_b = (_a = result === null || result === void 0 ? void 0 : result.data) === null || _a === void 0 ? void 0 : _a.submitForm) === null || _b === void 0 ? void 0 : _b.success,
84
84
  isError: result instanceof Error,
85
85
  });
86
86
  if (result instanceof Error) {
@@ -91,11 +91,12 @@ export function useLeadForm(props) {
91
91
  error: "",
92
92
  validationErrors: {},
93
93
  });
94
- if ((_b = (_a = result === null || result === void 0 ? void 0 : result.data) === null || _a === void 0 ? void 0 : _a.submitForm) === null || _b === void 0 ? void 0 : _b.success) {
94
+ if ((_d = (_c = result === null || result === void 0 ? void 0 : result.data) === null || _c === void 0 ? void 0 : _c.submitForm) === null || _d === void 0 ? void 0 : _d.success) {
95
95
  setSuccess(true);
96
96
  }
97
97
  }
98
98
  catch (error) {
99
+ console.log({ error });
99
100
  setLeadFormState({
100
101
  loading: false,
101
102
  error: props.networkErrorMessage,
@@ -1325,7 +1325,7 @@ function useLeadForm(props) {
1325
1325
  };
1326
1326
  }, [formRef.current]);
1327
1327
  const submit = async (event) => {
1328
- var _a, _b;
1328
+ var _a, _b, _c, _d;
1329
1329
  let formControls = event.target.getFormControls();
1330
1330
  let formData = {};
1331
1331
  let validationErrors = {};
@@ -1362,10 +1362,10 @@ function useLeadForm(props) {
1362
1362
  key: props.formKey,
1363
1363
  formData,
1364
1364
  };
1365
- const result = await submitLead({ formSubmissionInput: variables });
1366
1365
  try {
1366
+ const result = await submitLead({ formSubmissionInput: variables });
1367
1367
  console.log({
1368
- success: result.data.submitForm.success,
1368
+ success: (_b = (_a = result === null || result === void 0 ? void 0 : result.data) === null || _a === void 0 ? void 0 : _a.submitForm) === null || _b === void 0 ? void 0 : _b.success,
1369
1369
  isError: result instanceof Error,
1370
1370
  });
1371
1371
  if (result instanceof Error) {
@@ -1376,11 +1376,12 @@ function useLeadForm(props) {
1376
1376
  error: "",
1377
1377
  validationErrors: {},
1378
1378
  });
1379
- if ((_b = (_a = result === null || result === void 0 ? void 0 : result.data) === null || _a === void 0 ? void 0 : _a.submitForm) === null || _b === void 0 ? void 0 : _b.success) {
1379
+ if ((_d = (_c = result === null || result === void 0 ? void 0 : result.data) === null || _c === void 0 ? void 0 : _c.submitForm) === null || _d === void 0 ? void 0 : _d.success) {
1380
1380
  setSuccess(true);
1381
1381
  }
1382
1382
  }
1383
1383
  catch (error) {
1384
+ console.log({ error });
1384
1385
  setLeadFormState({
1385
1386
  loading: false,
1386
1387
  error: props.networkErrorMessage,