@homefile/components-v2 1.4.1 → 1.4.2
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/components/onboarding/pages/SignUp.d.ts +1 -1
- package/dist/components/onboarding/pages/SignUp.js +2 -2
- package/dist/interfaces/pages/SignUp.interface.d.ts +1 -1
- package/dist/stories/onboarding/pages/SignIn.stories.d.ts +0 -1
- package/dist/stories/onboarding/pages/SignIn.stories.js +0 -1
- package/dist/stories/onboarding/pages/SignUp.stories.d.ts +0 -1
- package/dist/stories/onboarding/pages/SignUp.stories.js +0 -1
- package/package.json +1 -1
- package/src/components/onboarding/pages/SignUp.tsx +4 -1
- package/src/interfaces/pages/SignUp.interface.ts +2 -2
- package/src/stories/onboarding/pages/SignIn.stories.tsx +0 -1
- package/src/stories/onboarding/pages/SignUp.stories.tsx +0 -1
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { SignUpI } from '../../../interfaces';
|
|
2
|
-
export declare const SignUp: ({ isLoading, handleCreateAccount, handleSignIn, showPromoCode,
|
|
2
|
+
export declare const SignUp: ({ isLoading, handleCreateAccount, handleSignIn, showPromoCode, signupErrorMessage, values, }: SignUpI) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -4,7 +4,7 @@ import { Box, Button, Center, Container, Stack, Text } from '@chakra-ui/react';
|
|
|
4
4
|
import { Logo, Footer, CardFooter, PageTitle, PasswordInput, TextInput, ButtonLoader, BasePageWrapper, } from '../..';
|
|
5
5
|
import { isEmptyField, isValidEmail, isValidPassword, passwordMatch, } from '../../../utils';
|
|
6
6
|
import { useSignUp } from '../../../hooks';
|
|
7
|
-
export const SignUp = ({ isLoading, handleCreateAccount, handleSignIn, showPromoCode,
|
|
7
|
+
export const SignUp = ({ isLoading, handleCreateAccount, handleSignIn, showPromoCode, signupErrorMessage, values = {
|
|
8
8
|
email: '',
|
|
9
9
|
firstName: '',
|
|
10
10
|
lastName: '',
|
|
@@ -22,5 +22,5 @@ export const SignUp = ({ isLoading, handleCreateAccount, handleSignIn, showPromo
|
|
|
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) ||
|
|
25
|
-
!passwordMatch(inputs.password, inputs.confirmPassword)), id: "confirmPassword", placeholder: t('forms.passwordConfirm'), value: (_c = inputs.confirmPassword) !== null && _c !== void 0 ? _c : '', handleChange: (event) => handleInputChange(event), autoComplete: "new-password" }), _jsx(Center, { px: ['container.sm', 'container.md', 'container.lg'], h: "4rem", children: _jsxs(Text, { textAlign: "center", variant: "info", w: "100%", children: [t('signup.terms'), _jsx("a", { target: "_blank", href: t('footer.termsUrl'), children: t('footer.termsLink') })] }) }), _jsx(Button, { isLoading: isLoading, spinner: _jsx(ButtonLoader, {}), onClick: handleSubmit, children: t('signup.signupBt') })] }) }), _jsx(CardFooter, { title: t('signup.signin'), buttonLabel: t('signup.signinBt'), handleButtonClick: handleSignIn })] }), _jsx(Footer, {})] }));
|
|
25
|
+
!passwordMatch(inputs.password, inputs.confirmPassword)), id: "confirmPassword", placeholder: t('forms.passwordConfirm'), value: (_c = inputs.confirmPassword) !== null && _c !== void 0 ? _c : '', handleChange: (event) => handleInputChange(event), autoComplete: "new-password" }), _jsx(Center, { px: ['container.sm', 'container.md', 'container.lg'], h: "4rem", children: _jsxs(Text, { textAlign: "center", variant: "info", w: "100%", children: [t('signup.terms'), _jsx("a", { target: "_blank", href: t('footer.termsUrl'), children: t('footer.termsLink') })] }) }), _jsx(Button, { isLoading: isLoading, spinner: _jsx(ButtonLoader, {}), onClick: handleSubmit, children: t('signup.signupBt') }), Boolean(signupErrorMessage) && (_jsx(Text, { variant: "error", children: signupErrorMessage }))] }) }), _jsx(CardFooter, { title: t('signup.signin'), buttonLabel: t('signup.signinBt'), handleButtonClick: handleSignIn })] }), _jsx(Footer, {})] }));
|
|
26
26
|
};
|
package/package.json
CHANGED
|
@@ -24,7 +24,7 @@ export const SignUp = ({
|
|
|
24
24
|
handleCreateAccount,
|
|
25
25
|
handleSignIn,
|
|
26
26
|
showPromoCode,
|
|
27
|
-
|
|
27
|
+
signupErrorMessage,
|
|
28
28
|
values = {
|
|
29
29
|
email: '',
|
|
30
30
|
firstName: '',
|
|
@@ -142,6 +142,9 @@ export const SignUp = ({
|
|
|
142
142
|
>
|
|
143
143
|
{t('signup.signupBt')}
|
|
144
144
|
</Button>
|
|
145
|
+
{Boolean(signupErrorMessage) && (
|
|
146
|
+
<Text variant="error">{signupErrorMessage}</Text>
|
|
147
|
+
)}
|
|
145
148
|
</Stack>
|
|
146
149
|
</Box>
|
|
147
150
|
<CardFooter
|