@homefile/components-v2 2.6.2 → 2.6.3
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.
|
@@ -10,7 +10,7 @@ export const SignUp = ({ isLoading, handleCreateAccount, handleSignIn, showPromo
|
|
|
10
10
|
lastName: '',
|
|
11
11
|
confirmPassword: '',
|
|
12
12
|
password: '',
|
|
13
|
-
|
|
13
|
+
partnerCode: '',
|
|
14
14
|
}, }) => {
|
|
15
15
|
var _a, _b, _c;
|
|
16
16
|
const { inputs, handleInputChange, handleSubmit, isValidated, passwordErrorMessage, } = useSignUp({
|
|
@@ -18,7 +18,7 @@ export const SignUp = ({ isLoading, handleCreateAccount, handleSignIn, showPromo
|
|
|
18
18
|
values,
|
|
19
19
|
});
|
|
20
20
|
return (_jsxs(BasePageWrapper, { children: [_jsxs(Container, { size: "onboarding", boxShadow: "lg", children: [_jsx(Logo, {}), _jsx(PageTitle, { title: t('signup.title') }), _jsx(Box, { px: ['container.sm', 'container.md', 'container.lg'], mb: 6, children: _jsxs(Stack, { spacing: "base", as: "form", children: [_jsx(TextInput, { errorMessage: t('forms.firstName') + ' ' + t('forms.required'), hasError: isValidated && isEmptyField(inputs.firstName), id: "firstName", placeholder: t('forms.firstName'), value: inputs.firstName, handleChange: handleInputChange, autoComplete: "given-name" }), _jsx(TextInput, { errorMessage: t('forms.lastName') + ' ' + t('forms.required'), hasError: isValidated && isEmptyField(inputs.lastName), id: "lastName", placeholder: t('forms.lastName'), value: inputs.lastName, handleChange: handleInputChange, autoComplete: "family-name" }), _jsx(TextInput, { autoCapitalize: "none", autoCorrect: "off", errorMessage: t('forms.email') + ' ' + t('forms.required'), hasError: isValidated &&
|
|
21
|
-
(isEmptyField(inputs.email) || !isValidEmail(inputs.email)), id: "email", placeholder: t('forms.email'), value: inputs.email, handleChange: handleInputChange, autoComplete: "email" }), showPromoCode && (_jsx(TextInput, { autoCapitalize: "none", autoCorrect: "off", id: "
|
|
21
|
+
(isEmptyField(inputs.email) || !isValidEmail(inputs.email)), id: "email", placeholder: t('forms.email'), value: inputs.email, handleChange: handleInputChange, autoComplete: "email" }), showPromoCode && (_jsx(TextInput, { autoCapitalize: "none", autoCorrect: "off", id: "partnerCode", placeholder: t('forms.promoCode'), value: (_a = inputs.partnerCode) !== null && _a !== void 0 ? _a : '', handleChange: handleInputChange, autoComplete: "off" })), _jsx(Text, { textAlign: "center", variant: "caption", children: t('signup.subtitle') }), _jsx(PasswordInput, { errorMessage: passwordErrorMessage(values.password), hasError: isValidated &&
|
|
22
22
|
(!isValidPassword(inputs.password) ||
|
|
23
23
|
!passwordMatch(inputs.password, inputs.confirmPassword)), id: "password", placeholder: t('forms.password'), value: (_b = inputs.password) !== null && _b !== void 0 ? _b : '', handleChange: (event) => handleInputChange(event), autoComplete: "new-password" }), _jsx(PasswordInput, { errorMessage: passwordErrorMessage(inputs.confirmPassword), hasError: isValidated &&
|
|
24
24
|
(!isValidPassword(inputs.confirmPassword) ||
|
package/package.json
CHANGED
|
@@ -31,7 +31,7 @@ export const SignUp = ({
|
|
|
31
31
|
lastName: '',
|
|
32
32
|
confirmPassword: '',
|
|
33
33
|
password: '',
|
|
34
|
-
|
|
34
|
+
partnerCode: '',
|
|
35
35
|
},
|
|
36
36
|
}: SignUpI) => {
|
|
37
37
|
const {
|
|
@@ -88,9 +88,9 @@ export const SignUp = ({
|
|
|
88
88
|
<TextInput
|
|
89
89
|
autoCapitalize="none"
|
|
90
90
|
autoCorrect="off"
|
|
91
|
-
id="
|
|
91
|
+
id="partnerCode"
|
|
92
92
|
placeholder={t('forms.promoCode')}
|
|
93
|
-
value={inputs.
|
|
93
|
+
value={inputs.partnerCode ?? ''}
|
|
94
94
|
handleChange={handleInputChange}
|
|
95
95
|
autoComplete="off"
|
|
96
96
|
/>
|