@open-tender/utils 0.1.58 → 0.1.59
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.
|
@@ -5,9 +5,9 @@ export declare const useSignUpGuestForm: (email: string, guest: CheckoutFormCust
|
|
|
5
5
|
inputRef: import("react").MutableRefObject<HTMLInputElement | null>;
|
|
6
6
|
fields: FormFields;
|
|
7
7
|
data: {
|
|
8
|
+
email: string;
|
|
8
9
|
company?: string | undefined;
|
|
9
10
|
customer_id?: number | undefined;
|
|
10
|
-
email?: string | undefined;
|
|
11
11
|
first_name?: string | undefined;
|
|
12
12
|
password?: string | undefined;
|
|
13
13
|
phone?: string | undefined;
|
|
@@ -12,7 +12,7 @@ const initialData = {
|
|
|
12
12
|
const useSignUpGuestForm = (email, guest, loading, error, signUp, submitGuest, hasThanx) => {
|
|
13
13
|
const submitRef = (0, react_1.useRef)(null);
|
|
14
14
|
const inputRef = (0, react_1.useRef)(null);
|
|
15
|
-
const initData = Object.assign(Object.assign({}, initialData), guest);
|
|
15
|
+
const initData = Object.assign(Object.assign(Object.assign({}, initialData), guest), { email });
|
|
16
16
|
const [data, setData] = (0, react_1.useState)(initData);
|
|
17
17
|
const [errors, setErrors] = (0, react_1.useState)({});
|
|
18
18
|
const [submitting, setSubmitting] = (0, react_1.useState)(false);
|
|
@@ -88,7 +88,7 @@ const useSignUpGuestForm = (email, guest, loading, error, signUp, submitGuest, h
|
|
|
88
88
|
}, [loading, error]);
|
|
89
89
|
(0, react_1.useEffect)(() => {
|
|
90
90
|
return () => {
|
|
91
|
-
setData({});
|
|
91
|
+
setData(Object.assign(Object.assign({}, initialData), { email: '' }));
|
|
92
92
|
setErrors({});
|
|
93
93
|
};
|
|
94
94
|
}, []);
|
|
@@ -5,9 +5,9 @@ export declare const useSignUpGuestForm: (email: string, guest: CheckoutFormCust
|
|
|
5
5
|
inputRef: import("react").MutableRefObject<HTMLInputElement | null>;
|
|
6
6
|
fields: FormFields;
|
|
7
7
|
data: {
|
|
8
|
+
email: string;
|
|
8
9
|
company?: string | undefined;
|
|
9
10
|
customer_id?: number | undefined;
|
|
10
|
-
email?: string | undefined;
|
|
11
11
|
first_name?: string | undefined;
|
|
12
12
|
password?: string | undefined;
|
|
13
13
|
phone?: string | undefined;
|
|
@@ -9,7 +9,7 @@ const initialData = {
|
|
|
9
9
|
export const useSignUpGuestForm = (email, guest, loading, error, signUp, submitGuest, hasThanx) => {
|
|
10
10
|
const submitRef = useRef(null);
|
|
11
11
|
const inputRef = useRef(null);
|
|
12
|
-
const initData = Object.assign(Object.assign({}, initialData), guest);
|
|
12
|
+
const initData = Object.assign(Object.assign(Object.assign({}, initialData), guest), { email });
|
|
13
13
|
const [data, setData] = useState(initData);
|
|
14
14
|
const [errors, setErrors] = useState({});
|
|
15
15
|
const [submitting, setSubmitting] = useState(false);
|
|
@@ -85,7 +85,7 @@ export const useSignUpGuestForm = (email, guest, loading, error, signUp, submitG
|
|
|
85
85
|
}, [loading, error]);
|
|
86
86
|
useEffect(() => {
|
|
87
87
|
return () => {
|
|
88
|
-
setData({});
|
|
88
|
+
setData(Object.assign(Object.assign({}, initialData), { email: '' }));
|
|
89
89
|
setErrors({});
|
|
90
90
|
};
|
|
91
91
|
}, []);
|
package/package.json
CHANGED