@open-tender/utils 0.0.68 → 0.1.0
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.
- package/dist/cjs/hooks/menu/useBuilder.d.ts +8 -7
- package/dist/cjs/hooks/menu/useBuilder.js +92 -86
- package/dist/cjs/hooks/menu/useOrderItem.d.ts +33 -43
- package/dist/cjs/hooks/menu/useOrderItem.js +21 -22
- package/dist/cjs/hooks/useAddressForm.js +1 -1
- package/dist/cjs/hooks/useAllergenForm.js +1 -1
- package/dist/cjs/hooks/useCartGuestForm.js +2 -2
- package/dist/cjs/hooks/useCheckoutLoginForm.js +1 -1
- package/dist/cjs/hooks/useCreditCard.d.ts +1 -2
- package/dist/cjs/hooks/useCreditCard.js +4 -3
- package/dist/cjs/hooks/useCreditCardForm.js +3 -3
- package/dist/cjs/hooks/useCurbside.js +1 -1
- package/dist/cjs/hooks/useDineInForm.js +1 -1
- package/dist/cjs/hooks/useDonationForm.js +5 -5
- package/dist/cjs/hooks/useGiftCardAssignForm.js +1 -1
- package/dist/cjs/hooks/useGiftCardAssignOtherForm.js +1 -1
- package/dist/cjs/hooks/useGiftCardForm.js +6 -4
- package/dist/cjs/hooks/useGiftCardsForm.js +22 -9
- package/dist/cjs/hooks/useGuestForm.js +1 -1
- package/dist/cjs/hooks/useImage.d.ts +1 -2
- package/dist/cjs/hooks/useImage.js +2 -1
- package/dist/cjs/hooks/useLevelUpForm.d.ts +1 -2
- package/dist/cjs/hooks/useLevelUpForm.js +3 -2
- package/dist/cjs/hooks/useOrderFulfillmentForm.js +3 -3
- package/dist/cjs/hooks/useOrderRating.js +1 -1
- package/dist/cjs/hooks/useOrderRatingForm.js +1 -1
- package/dist/cjs/hooks/useProfileForm.js +3 -3
- package/dist/cjs/hooks/useResetPasswordForm.js +2 -2
- package/dist/cjs/hooks/useSendResetForm.js +4 -2
- package/dist/cjs/hooks/useSignUpForm.js +14 -10
- package/dist/cjs/hooks/useSignUpGuestForm.js +3 -3
- package/dist/cjs/hooks/useSigninForm.js +1 -1
- package/dist/cjs/utils/cart.d.ts +97 -453
- package/dist/cjs/utils/cart.js +288 -361
- package/dist/cjs/utils/customer.js +1 -1
- package/dist/cjs/utils/errors.js +4 -2
- package/dist/cjs/utils/favorites.d.ts +3 -3
- package/dist/cjs/utils/favorites.js +11 -4
- package/dist/cjs/utils/helpers.d.ts +8 -3
- package/dist/cjs/utils/helpers.js +31 -3
- package/dist/cjs/utils/index.d.ts +1 -0
- package/dist/cjs/utils/index.js +1 -0
- package/dist/cjs/utils/maps.js +1 -1
- package/dist/cjs/utils/orders.d.ts +3 -3
- package/dist/cjs/utils/refunds.d.ts +4 -4
- package/dist/cjs/utils/revenueCenters.d.ts +11 -0
- package/dist/cjs/utils/revenueCenters.js +125 -0
- package/dist/cjs/utils/rewards.js +5 -5
- package/dist/cjs/utils/theme.js +7 -7
- package/dist/esm/hooks/menu/useBuilder.d.ts +8 -7
- package/dist/esm/hooks/menu/useBuilder.js +92 -86
- package/dist/esm/hooks/menu/useOrderItem.d.ts +33 -43
- package/dist/esm/hooks/menu/useOrderItem.js +22 -23
- package/dist/esm/hooks/useAddressForm.js +1 -1
- package/dist/esm/hooks/useAllergenForm.js +1 -1
- package/dist/esm/hooks/useCartGuestForm.js +2 -2
- package/dist/esm/hooks/useCheckoutLoginForm.js +1 -1
- package/dist/esm/hooks/useCreditCard.d.ts +1 -2
- package/dist/esm/hooks/useCreditCard.js +4 -5
- package/dist/esm/hooks/useCreditCardForm.js +3 -3
- package/dist/esm/hooks/useCurbside.js +1 -1
- package/dist/esm/hooks/useDineInForm.js +1 -1
- package/dist/esm/hooks/useDonationForm.js +5 -5
- package/dist/esm/hooks/useGiftCardAssignForm.js +1 -1
- package/dist/esm/hooks/useGiftCardAssignOtherForm.js +1 -1
- package/dist/esm/hooks/useGiftCardForm.js +6 -4
- package/dist/esm/hooks/useGiftCardsForm.js +22 -9
- package/dist/esm/hooks/useGuestForm.js +1 -1
- package/dist/esm/hooks/useImage.d.ts +1 -2
- package/dist/esm/hooks/useImage.js +1 -2
- package/dist/esm/hooks/useLevelUpForm.d.ts +1 -2
- package/dist/esm/hooks/useLevelUpForm.js +2 -3
- package/dist/esm/hooks/useOrderFulfillmentForm.js +3 -3
- package/dist/esm/hooks/useOrderRating.js +1 -1
- package/dist/esm/hooks/useOrderRatingForm.js +1 -1
- package/dist/esm/hooks/useProfileForm.js +3 -3
- package/dist/esm/hooks/useResetPasswordForm.js +2 -2
- package/dist/esm/hooks/useSendResetForm.js +4 -2
- package/dist/esm/hooks/useSignUpForm.js +14 -10
- package/dist/esm/hooks/useSignUpGuestForm.js +3 -3
- package/dist/esm/hooks/useSigninForm.js +1 -1
- package/dist/esm/utils/cart.d.ts +97 -453
- package/dist/esm/utils/cart.js +276 -339
- package/dist/esm/utils/customer.js +1 -1
- package/dist/esm/utils/errors.js +4 -2
- package/dist/esm/utils/favorites.d.ts +3 -3
- package/dist/esm/utils/favorites.js +11 -4
- package/dist/esm/utils/helpers.d.ts +8 -3
- package/dist/esm/utils/helpers.js +25 -2
- package/dist/esm/utils/index.d.ts +1 -0
- package/dist/esm/utils/index.js +1 -0
- package/dist/esm/utils/maps.js +1 -1
- package/dist/esm/utils/orders.d.ts +3 -3
- package/dist/esm/utils/refunds.d.ts +4 -4
- package/dist/esm/utils/revenueCenters.d.ts +11 -0
- package/dist/esm/utils/revenueCenters.js +115 -0
- package/dist/esm/utils/rewards.js +1 -1
- package/dist/esm/utils/theme.js +7 -7
- package/package.json +2 -4
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.useGiftCardsForm = void 0;
|
|
4
4
|
const react_1 = require("react");
|
|
5
|
-
const utils_1 = require("
|
|
5
|
+
const utils_1 = require("../utils");
|
|
6
6
|
const useGiftCardsForm = (purchase, reset, loading, error, success, setAlert, customer = {}, creditCards = [], recaptchaKey = null, initState, cardData, cardType, windowRef) => {
|
|
7
7
|
var _a, _b;
|
|
8
8
|
const submitRef = (0, react_1.useRef)(null);
|
|
@@ -16,7 +16,7 @@ const useGiftCardsForm = (purchase, reset, loading, error, success, setAlert, cu
|
|
|
16
16
|
const [creditCardOptions, setCreditCardOptions] = (0, react_1.useState)([]);
|
|
17
17
|
const [errors, setErrors] = (0, react_1.useState)({});
|
|
18
18
|
const [submitting, setSubmitting] = (0, react_1.useState)(false);
|
|
19
|
-
const url = (_b = (_a = windowRef === null || windowRef === void 0 ? void 0 : windowRef.location) === null || _a === void 0 ? void 0 : _a.origin) !== null && _b !== void 0 ? _b :
|
|
19
|
+
const url = (_b = (_a = windowRef === null || windowRef === void 0 ? void 0 : windowRef.location) === null || _a === void 0 ? void 0 : _a.origin) !== null && _b !== void 0 ? _b : '';
|
|
20
20
|
const newCardErrors = (0, react_1.useMemo)(() => errors
|
|
21
21
|
? Object.entries(errors)
|
|
22
22
|
.filter(([key]) => key !== 'form')
|
|
@@ -39,9 +39,9 @@ const useGiftCardsForm = (purchase, reset, loading, error, success, setAlert, cu
|
|
|
39
39
|
}, [windowRef, loading, error, setAlert, success]);
|
|
40
40
|
(0, react_1.useEffect)(() => {
|
|
41
41
|
if (creditCards.length) {
|
|
42
|
-
const options = creditCards.map(
|
|
42
|
+
const options = creditCards.map(i => ({
|
|
43
43
|
name: `${i.card_type_name} ending in ${i.last4}`,
|
|
44
|
-
value: i.customer_card_id
|
|
44
|
+
value: i.customer_card_id
|
|
45
45
|
}));
|
|
46
46
|
setCreditCardOptions(options);
|
|
47
47
|
const defaultCard = creditCards.length
|
|
@@ -98,7 +98,7 @@ const useGiftCardsForm = (purchase, reset, loading, error, success, setAlert, cu
|
|
|
98
98
|
var _a;
|
|
99
99
|
const alert = {
|
|
100
100
|
type: 'working',
|
|
101
|
-
args: { text: 'Submitting your purchase...' }
|
|
101
|
+
args: { text: 'Submitting your purchase...' }
|
|
102
102
|
};
|
|
103
103
|
if (recaptchaKey) {
|
|
104
104
|
try {
|
|
@@ -106,7 +106,7 @@ const useGiftCardsForm = (purchase, reset, loading, error, success, setAlert, cu
|
|
|
106
106
|
if (!token) {
|
|
107
107
|
setSubmitting(false);
|
|
108
108
|
setErrors({
|
|
109
|
-
form: 'Please complete the recaptcha before submitting'
|
|
109
|
+
form: 'Please complete the recaptcha before submitting'
|
|
110
110
|
});
|
|
111
111
|
windowRef === null || windowRef === void 0 ? void 0 : windowRef.scrollTo(0, 0);
|
|
112
112
|
}
|
|
@@ -114,7 +114,14 @@ const useGiftCardsForm = (purchase, reset, loading, error, success, setAlert, cu
|
|
|
114
114
|
setSubmitting(true);
|
|
115
115
|
setAlert(alert);
|
|
116
116
|
const gift_cards = makeGiftCards(cards);
|
|
117
|
-
purchase({
|
|
117
|
+
purchase({
|
|
118
|
+
token,
|
|
119
|
+
credit_card,
|
|
120
|
+
name: name !== null && name !== void 0 ? name : '',
|
|
121
|
+
email: email !== null && email !== void 0 ? email : '',
|
|
122
|
+
url,
|
|
123
|
+
gift_cards
|
|
124
|
+
});
|
|
118
125
|
}
|
|
119
126
|
}
|
|
120
127
|
catch (err) {
|
|
@@ -127,7 +134,13 @@ const useGiftCardsForm = (purchase, reset, loading, error, success, setAlert, cu
|
|
|
127
134
|
setSubmitting(true);
|
|
128
135
|
setAlert(alert);
|
|
129
136
|
const gift_cards = makeGiftCards(cards);
|
|
130
|
-
purchase({
|
|
137
|
+
purchase({
|
|
138
|
+
credit_card,
|
|
139
|
+
name: name !== null && name !== void 0 ? name : '',
|
|
140
|
+
email: email !== null && email !== void 0 ? email : '',
|
|
141
|
+
url,
|
|
142
|
+
gift_cards
|
|
143
|
+
});
|
|
131
144
|
}
|
|
132
145
|
};
|
|
133
146
|
const handleSubmit = (evt) => {
|
|
@@ -183,7 +196,7 @@ const useGiftCardsForm = (purchase, reset, loading, error, success, setAlert, cu
|
|
|
183
196
|
creditCard,
|
|
184
197
|
setCreditCard,
|
|
185
198
|
errors,
|
|
186
|
-
submitting
|
|
199
|
+
submitting
|
|
187
200
|
};
|
|
188
201
|
};
|
|
189
202
|
exports.useGiftCardsForm = useGiftCardsForm;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.useImage = void 0;
|
|
3
4
|
const react_1 = require("react");
|
|
4
5
|
// https://typesafe.blog/article/fetch-images-with-a-react-hook
|
|
5
6
|
const useImage = (src) => {
|
|
@@ -28,4 +29,4 @@ const useImage = (src) => {
|
|
|
28
29
|
}, [src]);
|
|
29
30
|
return { hasLoaded, hasError, hasStartedInitialFetch };
|
|
30
31
|
};
|
|
31
|
-
exports.
|
|
32
|
+
exports.useImage = useImage;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import { RequestStatus } from '@open-tender/types';
|
|
3
|
-
declare const useLevelUpForm: (email: string, loading: RequestStatus, error: any, connect: (data: any, callback: any) => void, callback: any) => {
|
|
3
|
+
export declare const useLevelUpForm: (email: string, loading: RequestStatus, error: any, connect: (data: any, callback: any) => void, callback: any) => {
|
|
4
4
|
submitRef: import("react").MutableRefObject<HTMLButtonElement | null>;
|
|
5
5
|
inputRef: import("react").MutableRefObject<HTMLInputElement | null>;
|
|
6
6
|
data: any;
|
|
@@ -9,4 +9,3 @@ declare const useLevelUpForm: (email: string, loading: RequestStatus, error: any
|
|
|
9
9
|
handleChange: (evt?: any) => void;
|
|
10
10
|
handleSubmit: (evt?: any) => void;
|
|
11
11
|
};
|
|
12
|
-
export default useLevelUpForm;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.useLevelUpForm = void 0;
|
|
3
4
|
const react_1 = require("react");
|
|
4
5
|
const useLevelUpForm = (email, loading, error, connect, callback) => {
|
|
5
6
|
const submitRef = (0, react_1.useRef)(null);
|
|
@@ -36,7 +37,7 @@ const useLevelUpForm = (email, loading, error, connect, callback) => {
|
|
|
36
37
|
errors,
|
|
37
38
|
submitting,
|
|
38
39
|
handleChange,
|
|
39
|
-
handleSubmit
|
|
40
|
+
handleSubmit
|
|
40
41
|
};
|
|
41
42
|
};
|
|
42
|
-
exports.
|
|
43
|
+
exports.useLevelUpForm = useLevelUpForm;
|
|
@@ -7,9 +7,9 @@ const useOrderFulfillmentForm = (orderId, fulfillment, loading, error, update, s
|
|
|
7
7
|
const [data, setData] = (0, react_1.useState)({});
|
|
8
8
|
const [submitting, setSubmitting] = (0, react_1.useState)(false);
|
|
9
9
|
const errors = error || {};
|
|
10
|
-
const empty = Object.values(fulfillment).every(
|
|
10
|
+
const empty = Object.values(fulfillment).every(i => !i);
|
|
11
11
|
const fields = !empty && !showAllFields
|
|
12
|
-
? settings === null || settings === void 0 ? void 0 : settings.fields.filter(
|
|
12
|
+
? settings === null || settings === void 0 ? void 0 : settings.fields.filter(i => i.name.startsWith('arrival'))
|
|
13
13
|
: settings === null || settings === void 0 ? void 0 : settings.fields;
|
|
14
14
|
(0, react_1.useEffect)(() => {
|
|
15
15
|
if (loading === 'idle')
|
|
@@ -36,7 +36,7 @@ const useOrderFulfillmentForm = (orderId, fulfillment, loading, error, update, s
|
|
|
36
36
|
errors,
|
|
37
37
|
submitting,
|
|
38
38
|
handleChange,
|
|
39
|
-
handleSubmit
|
|
39
|
+
handleSubmit
|
|
40
40
|
};
|
|
41
41
|
};
|
|
42
42
|
exports.useOrderFulfillmentForm = useOrderFulfillmentForm;
|
|
@@ -18,10 +18,10 @@ const useProfileForm = (profile, loading, error, update, optIns = {}) => {
|
|
|
18
18
|
name: 'email',
|
|
19
19
|
type: 'email',
|
|
20
20
|
required: true,
|
|
21
|
-
autoComplete: 'email'
|
|
21
|
+
autoComplete: 'email'
|
|
22
22
|
},
|
|
23
23
|
{ label: 'Phone', name: 'phone', type: 'tel', required: true },
|
|
24
|
-
{ label: 'Company', name: 'company', type: 'text' }
|
|
24
|
+
{ label: 'Company', name: 'company', type: 'text' }
|
|
25
25
|
];
|
|
26
26
|
(0, react_1.useEffect)(() => {
|
|
27
27
|
if (loading === 'idle') {
|
|
@@ -70,7 +70,7 @@ const useProfileForm = (profile, loading, error, update, optIns = {}) => {
|
|
|
70
70
|
errMsg,
|
|
71
71
|
handleChange,
|
|
72
72
|
handleRadio,
|
|
73
|
-
handleSubmit
|
|
73
|
+
handleSubmit
|
|
74
74
|
};
|
|
75
75
|
};
|
|
76
76
|
exports.useProfileForm = useProfileForm;
|
|
@@ -10,7 +10,7 @@ const useResetPasswordForm = (loading, error, reset, resetForm, resetToken) => {
|
|
|
10
10
|
const [submitting, setSubmitting] = (0, react_1.useState)(false);
|
|
11
11
|
const fields = [
|
|
12
12
|
{ label: 'New Password', name: 'new_password', type: 'password' },
|
|
13
|
-
{ label: 'Confirm Password', name: 'confirm', type: 'password' }
|
|
13
|
+
{ label: 'Confirm Password', name: 'confirm', type: 'password' }
|
|
14
14
|
];
|
|
15
15
|
(0, react_1.useEffect)(() => {
|
|
16
16
|
setData({});
|
|
@@ -62,7 +62,7 @@ const useResetPasswordForm = (loading, error, reset, resetForm, resetToken) => {
|
|
|
62
62
|
errors,
|
|
63
63
|
submitting,
|
|
64
64
|
handleChange,
|
|
65
|
-
handleSubmit
|
|
65
|
+
handleSubmit
|
|
66
66
|
};
|
|
67
67
|
};
|
|
68
68
|
exports.useResetPasswordForm = useResetPasswordForm;
|
|
@@ -19,7 +19,9 @@ const useSendResetForm = (loading, error, sendReset, callback, windowref, linkUr
|
|
|
19
19
|
const handleSubmit = (evt) => {
|
|
20
20
|
var _a, _b;
|
|
21
21
|
evt === null || evt === void 0 ? void 0 : evt.preventDefault();
|
|
22
|
-
const linkUrl = windowref
|
|
22
|
+
const linkUrl = windowref
|
|
23
|
+
? `${windowref.location.origin}/reset-password`
|
|
24
|
+
: `${linkUrlVal}`;
|
|
23
25
|
sendReset(data.email, linkUrl).then(() => {
|
|
24
26
|
if (callback)
|
|
25
27
|
callback();
|
|
@@ -32,7 +34,7 @@ const useSendResetForm = (loading, error, sendReset, callback, windowref, linkUr
|
|
|
32
34
|
data,
|
|
33
35
|
errMsg,
|
|
34
36
|
handleChange,
|
|
35
|
-
handleSubmit
|
|
37
|
+
handleSubmit
|
|
36
38
|
};
|
|
37
39
|
};
|
|
38
40
|
exports.useSendResetForm = useSendResetForm;
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.useSignUpForm = void 0;
|
|
4
4
|
const react_1 = require("react");
|
|
5
|
-
const utils_1 = require("
|
|
5
|
+
const utils_1 = require("../utils");
|
|
6
6
|
const useSignUpForm = (loading, error, signUp, callback, checkConfig = {}, hasThanx = false) => {
|
|
7
7
|
const { displayed, required } = checkConfig || {};
|
|
8
8
|
const companyDisplayed = displayed && displayed.customer.includes('company');
|
|
@@ -17,41 +17,41 @@ const useSignUpForm = (loading, error, signUp, callback, checkConfig = {}, hasTh
|
|
|
17
17
|
label: 'First Name',
|
|
18
18
|
name: 'first_name',
|
|
19
19
|
type: 'text',
|
|
20
|
-
required: true
|
|
20
|
+
required: true
|
|
21
21
|
},
|
|
22
22
|
{
|
|
23
23
|
label: 'Last Name',
|
|
24
24
|
name: 'last_name',
|
|
25
25
|
type: 'text',
|
|
26
|
-
required: true
|
|
26
|
+
required: true
|
|
27
27
|
},
|
|
28
28
|
{
|
|
29
29
|
label: 'Email',
|
|
30
30
|
name: 'email',
|
|
31
31
|
type: 'email',
|
|
32
32
|
required: true,
|
|
33
|
-
autoComplete: 'email'
|
|
33
|
+
autoComplete: 'email'
|
|
34
34
|
},
|
|
35
35
|
{
|
|
36
36
|
label: 'Password',
|
|
37
37
|
name: 'password',
|
|
38
38
|
type: 'password',
|
|
39
39
|
required: true,
|
|
40
|
-
autoComplete: 'new-password'
|
|
40
|
+
autoComplete: 'new-password'
|
|
41
41
|
},
|
|
42
|
-
{ label: 'Phone', name: 'phone', type: 'tel', required: true }
|
|
42
|
+
{ label: 'Phone', name: 'phone', type: 'tel', required: true }
|
|
43
43
|
];
|
|
44
44
|
if (companyDisplayed || companyRequired) {
|
|
45
45
|
const company = {
|
|
46
46
|
label: 'Company',
|
|
47
47
|
name: 'company',
|
|
48
48
|
type: 'text',
|
|
49
|
-
required: companyRequired
|
|
49
|
+
required: companyRequired
|
|
50
50
|
};
|
|
51
51
|
fields = [...fields, company];
|
|
52
52
|
}
|
|
53
53
|
const formfields = hasThanx
|
|
54
|
-
? fields.filter(
|
|
54
|
+
? fields.filter(i => i.name !== 'password')
|
|
55
55
|
: fields;
|
|
56
56
|
(0, react_1.useEffect)(() => {
|
|
57
57
|
return () => {
|
|
@@ -68,7 +68,11 @@ const useSignUpForm = (loading, error, signUp, callback, checkConfig = {}, hasTh
|
|
|
68
68
|
}
|
|
69
69
|
}, [loading, error]);
|
|
70
70
|
const handleChange = (name, type, value, checked) => {
|
|
71
|
-
const inputValue = type === 'checkbox'
|
|
71
|
+
const inputValue = type === 'checkbox'
|
|
72
|
+
? checked
|
|
73
|
+
: name === 'phone'
|
|
74
|
+
? (0, utils_1.makePhone)(value !== null && value !== void 0 ? value : '')
|
|
75
|
+
: value;
|
|
72
76
|
setData(Object.assign(Object.assign({}, data), { [name]: inputValue }));
|
|
73
77
|
};
|
|
74
78
|
const handleSubmit = (evt) => {
|
|
@@ -87,7 +91,7 @@ const useSignUpForm = (loading, error, signUp, callback, checkConfig = {}, hasTh
|
|
|
87
91
|
formfields,
|
|
88
92
|
errMsg,
|
|
89
93
|
handleChange,
|
|
90
|
-
handleSubmit
|
|
94
|
+
handleSubmit
|
|
91
95
|
};
|
|
92
96
|
};
|
|
93
97
|
exports.useSignUpForm = useSignUpForm;
|
|
@@ -2,12 +2,12 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.useSignUpGuestForm = void 0;
|
|
4
4
|
const react_1 = require("react");
|
|
5
|
-
const utils_1 = require("
|
|
5
|
+
const utils_1 = require("../utils");
|
|
6
6
|
const initialData = {
|
|
7
7
|
first_name: '',
|
|
8
8
|
last_name: '',
|
|
9
9
|
phone: '',
|
|
10
|
-
password: ''
|
|
10
|
+
password: ''
|
|
11
11
|
};
|
|
12
12
|
const useSignUpGuestForm = (email, guest, loading, error, signUp, submitGuest, hasThanx) => {
|
|
13
13
|
const submitRef = (0, react_1.useRef)(null);
|
|
@@ -70,7 +70,7 @@ const useSignUpGuestForm = (email, guest, loading, error, signUp, submitGuest, h
|
|
|
70
70
|
submitting,
|
|
71
71
|
handleChange,
|
|
72
72
|
handleSubmit,
|
|
73
|
-
handleGuest
|
|
73
|
+
handleGuest
|
|
74
74
|
};
|
|
75
75
|
};
|
|
76
76
|
exports.useSignUpGuestForm = useSignUpGuestForm;
|