@kiosinc/commons-rn 0.1.19 → 0.1.20

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.
Files changed (38) hide show
  1. package/lib/commonjs/auth/screens/LoginScreen.js +4 -8
  2. package/lib/commonjs/auth/screens/LoginScreen.js.map +1 -1
  3. package/lib/commonjs/auth/screens/ResetPassword.js +4 -2
  4. package/lib/commonjs/auth/screens/ResetPassword.js.map +1 -1
  5. package/lib/commonjs/auth/screens/SignUp.js +4 -1
  6. package/lib/commonjs/auth/screens/SignUp.js.map +1 -1
  7. package/lib/commonjs/auth/screens/SignUpPassword.js +4 -1
  8. package/lib/commonjs/auth/screens/SignUpPassword.js.map +1 -1
  9. package/lib/commonjs/auth/screens/VerifyPhoneNumber.js +4 -1
  10. package/lib/commonjs/auth/screens/VerifyPhoneNumber.js.map +1 -1
  11. package/lib/commonjs/components/TextInput.js +4 -2
  12. package/lib/commonjs/components/TextInput.js.map +1 -1
  13. package/lib/module/auth/screens/LoginScreen.js +5 -9
  14. package/lib/module/auth/screens/LoginScreen.js.map +1 -1
  15. package/lib/module/auth/screens/ResetPassword.js +5 -3
  16. package/lib/module/auth/screens/ResetPassword.js.map +1 -1
  17. package/lib/module/auth/screens/SignUp.js +5 -2
  18. package/lib/module/auth/screens/SignUp.js.map +1 -1
  19. package/lib/module/auth/screens/SignUpPassword.js +5 -2
  20. package/lib/module/auth/screens/SignUpPassword.js.map +1 -1
  21. package/lib/module/auth/screens/VerifyPhoneNumber.js +5 -2
  22. package/lib/module/auth/screens/VerifyPhoneNumber.js.map +1 -1
  23. package/lib/module/components/TextInput.js +4 -2
  24. package/lib/module/components/TextInput.js.map +1 -1
  25. package/lib/typescript/src/auth/screens/LoginScreen.d.ts.map +1 -1
  26. package/lib/typescript/src/auth/screens/ResetPassword.d.ts.map +1 -1
  27. package/lib/typescript/src/auth/screens/SignUp.d.ts.map +1 -1
  28. package/lib/typescript/src/auth/screens/SignUpPassword.d.ts.map +1 -1
  29. package/lib/typescript/src/auth/screens/VerifyPhoneNumber.d.ts.map +1 -1
  30. package/lib/typescript/src/components/TextInput.d.ts +1 -0
  31. package/lib/typescript/src/components/TextInput.d.ts.map +1 -1
  32. package/package.json +1 -1
  33. package/src/auth/screens/LoginScreen.tsx +85 -91
  34. package/src/auth/screens/ResetPassword.tsx +46 -42
  35. package/src/auth/screens/SignUp.tsx +105 -101
  36. package/src/auth/screens/SignUpPassword.tsx +68 -64
  37. package/src/auth/screens/VerifyPhoneNumber.tsx +55 -51
  38. package/src/components/TextInput.tsx +11 -6
@@ -15,6 +15,7 @@ export const TextInputStyled = ({
15
15
  export const TextInput = ({
16
16
  errorMessage,
17
17
  secureTextEntry,
18
+ rightIcon,
18
19
  ...rest
19
20
  }) => {
20
21
  const [status, setStatus] = React.useState('checked');
@@ -28,13 +29,13 @@ export const TextInput = ({
28
29
  }, /*#__PURE__*/React.createElement(TextInputStyled, _extends({
29
30
  width: "100%",
30
31
  secureTextEntry: shouldShowPassword && secureTextEntry
31
- }, rest)), secureTextEntry && /*#__PURE__*/React.createElement(View, {
32
+ }, rest)), (secureTextEntry || rightIcon) && /*#__PURE__*/React.createElement(View, {
32
33
  pt: "4",
33
34
  justifyContent: "center",
34
35
  alignSelf: "flex-end",
35
36
  position: "absolute",
36
37
  width: 48
37
- }, /*#__PURE__*/React.createElement(ToggleButton, {
38
+ }, rightIcon ?? /*#__PURE__*/React.createElement(ToggleButton, {
38
39
  icon: shouldShowPassword ? 'eye' : 'eye-off',
39
40
  size: 20,
40
41
  onPress: onButtonToggle
@@ -47,6 +48,7 @@ export const TextInput = ({
47
48
  size: 14,
48
49
  width: 20,
49
50
  margin: "0",
51
+ bg: 'background',
50
52
  iconColor: theme.colors.error
51
53
  }), /*#__PURE__*/React.createElement(Text, {
52
54
  variant: "bodySmall",
@@ -1 +1 @@
1
- {"version":3,"names":["React","TextInput","T","ToggleButton","useTheme","View","IconButton","Text","useRestyle","spacing","border","backgroundColor","backgroundColorShorthand","composeRestyleFunctions","spacingShorthand","layout","position","restyleFunctions","TextInputStyled","rest","props","createElement","errorMessage","secureTextEntry","status","setStatus","useState","onButtonToggle","shouldShowPassword","theme","justifyContent","_extends","width","pt","alignSelf","icon","size","onPress","Fragment","flexDirection","alignItems","pb","margin","iconColor","colors","error","variant","color"],"sourceRoot":"../../../src","sources":["components/TextInput.tsx"],"mappings":";AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SACEC,SAAS,IAAIC,CAAC,EAEdC,YAAY,EACZC,QAAQ,QACH,oBAAoB;AAC3B,SAASC,IAAI,QAAQ,QAAQ;AAC7B,SAASC,UAAU,QAAQ,cAAc;AACzC,SAASC,IAAI,QAAQ,QAAQ;AAC7B,SACEC,UAAU,EACVC,OAAO,EACPC,MAAM,EACNC,eAAe,EACfC,wBAAwB,EAIxBC,uBAAuB,EAIvBC,gBAAgB,EAChBC,MAAM,EACNC,QAAQ,QAEH,kBAAkB;AAWzB,MAAMC,gBAAgB,GAAGJ,uBAAuB,CAA0B,CACxEJ,OAAO,EACPK,gBAAgB,EAChBC,MAAM,EACNC,QAAQ,EACRN,MAAM,EACNC,eAAe,EACfC,wBAAwB,CACzB,CAAC;AAOF,OAAO,MAAMM,eAAe,GAAGA,CAAC;EAAE,GAAGC;AAAY,CAAC,KAAK;EACrD,MAAMC,KAAK,GAAGZ,UAAU,CAACS,gBAAgB,EAASE,IAAI,CAAC;EAEvD,oBAAOnB,KAAA,CAAAqB,aAAA,CAACnB,CAAC,EAAKkB,KAAQ,CAAC;AACzB,CAAC;AAED,OAAO,MAAMnB,SAA0B,GAAGA,CAAC;EACzCqB,YAAY;EACZC,eAAe;EACf,GAAGJ;AACL,CAAC,KAAK;EACJ,MAAM,CAACK,MAAM,EAAEC,SAAS,CAAC,GAAGzB,KAAK,CAAC0B,QAAQ,CAAC,SAAS,CAAC;EAErD,MAAMC,cAAc,GAAGA,CAAA,KAAM;IAC3BF,SAAS,CAACD,MAAM,KAAK,SAAS,G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C,KAAK,EAAC;EAAO,GACpCzB,YACG,CACF,CACN,CAEA,CAAC;AAEX,CAAC"}
1
+ {"version":3,"names":["React","TextInput","T","ToggleButton","useTheme","View","IconButton","Text","useRestyle","spacing","border","backgroundColor","backgroundColorShorthand","composeRestyleFunctions","spacingShorthand","layout","position","restyleFunctions","TextInputStyled","rest","props","createElement","errorMessage","secureTextEntry","rightIcon","status","setStatus","useState","onButtonToggle","shouldShowPassword","theme","justifyContent","_extends","width","pt","alignSelf","icon","size","onPress","Fragment","flexDirection","alignItems","pb","margin","bg","iconColor","colors","error","variant","color"],"sourceRoot":"../../../src","sources":["components/TextInput.tsx"],"mappings":";AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SACEC,SAAS,IAAIC,CAAC,EAEdC,YAAY,EACZC,QAAQ,QACH,oBAAoB;AAC3B,SAASC,IAAI,QAAQ,QAAQ;AAC7B,SAASC,UAAU,QAAQ,cAAc;AACzC,SAASC,IAAI,QAAQ,QAAQ;AAC7B,SACEC,UAAU,EACVC,OAAO,EACPC,MAAM,EACNC,eAAe,EACfC,wBAAwB,EAIxBC,uBAAuB,EAIvBC,gBAAgB,EAChBC,MAAM,EACNC,QAAQ,QAEH,kBAAkB;AAWzB,MAAMC,gBAAgB,GAAGJ,uBAAuB,CAA0B,CACxEJ,OAAO,EACPK,gBAAgB,EAChBC,MAAM,EACNC,QAAQ,EACRN,MAAM,EACNC,eAAe,EACfC,wBAAwB,CACzB,CAAC;AAQF,OAAO,MAAMM,eAAe,GAAGA,CAAC;EAAE,GAAGC;AAAY,CAAC,KAAK;EACrD,MAAMC,KAAK,GAAGZ,UAAU,CAACS,gBAAgB,EAASE,IAAI,CAAC;EAEvD,oBAAOnB,KAAA,CAAAqB,aAAA,CAACnB,CAAC,EAAKkB,KAAQ,CAAC;AACzB,CAAC;AAED,OAAO,MAAMnB,SAA0B,GAAGA,CAAC;EACzCqB,YAAY;EACZC,eAAe;EACfC,SAAS;EACT,GAAGL;AACL,CAAC,KAAK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C3BC,IAAI,EAAE,EAAG;IACTJ,KAAK,EAAE,EAAG;IACVU,MAAM,EAAC,GAAG;IACVC,EAAE,EAAE,YAAa;IACjBC,SAAS,EAAEf,KAAK,CAACgB,MAAM,CAACC;EAAM,CAC/B,CAAC,eACF/C,KAAA,CAAAqB,aAAA,CAACd,IAAI;IAACyC,OAAO,EAAC,WAAW;IAACC,KAAK,EAAC;EAAO,GACpC3B,YACG,CACF,CACN,CAEA,CAAC;AAEX,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"LoginScreen.d.ts","sourceRoot":"","sources":["../../../../../src/auth/screens/LoginScreen.tsx"],"names":[],"mappings":";AA4BA,eAAO,MAAM,WAAW,mBA2IvB,CAAC"}
1
+ {"version":3,"file":"LoginScreen.d.ts","sourceRoot":"","sources":["../../../../../src/auth/screens/LoginScreen.tsx"],"names":[],"mappings":";AA6BA,eAAO,MAAM,WAAW,mBAoIvB,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"ResetPassword.d.ts","sourceRoot":"","sources":["../../../../../src/auth/screens/ResetPassword.tsx"],"names":[],"mappings":";AAoBA,eAAO,MAAM,mBAAmB,mBAmE/B,CAAC"}
1
+ {"version":3,"file":"ResetPassword.d.ts","sourceRoot":"","sources":["../../../../../src/auth/screens/ResetPassword.tsx"],"names":[],"mappings":";AAqBA,eAAO,MAAM,mBAAmB,mBAsE/B,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"SignUp.d.ts","sourceRoot":"","sources":["../../../../../src/auth/screens/SignUp.tsx"],"names":[],"mappings":";AAuBA,MAAM,MAAM,SAAS,GAAG;IACtB,WAAW,EAAE,MAAM,CAAC;IACpB,KAAK,EAAE,MAAM,CAAC;IACd,WAAW,EAAE,MAAM,CAAC;IACpB,IAAI,CAAC,EAAE,MAAM,CAAC;CACf,CAAC;AAEF,eAAO,MAAM,YAAY,mBAqJxB,CAAC"}
1
+ {"version":3,"file":"SignUp.d.ts","sourceRoot":"","sources":["../../../../../src/auth/screens/SignUp.tsx"],"names":[],"mappings":";AAwBA,MAAM,MAAM,SAAS,GAAG;IACtB,WAAW,EAAE,MAAM,CAAC;IACpB,KAAK,EAAE,MAAM,CAAC;IACd,WAAW,EAAE,MAAM,CAAC;IACpB,IAAI,CAAC,EAAE,MAAM,CAAC;CACf,CAAC;AAEF,eAAO,MAAM,YAAY,mBAwJxB,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"SignUpPassword.d.ts","sourceRoot":"","sources":["../../../../../src/auth/screens/SignUpPassword.tsx"],"names":[],"mappings":"AAQA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,0BAA0B,CAAC;AAC1D,OAAO,KAAK,MAAM,OAAO,CAAC;AAW1B,KAAK,mBAAmB,GAAG;IACzB,KAAK,EAAE,SAAS,CAAC,aAAa,EAAE,gBAAgB,CAAC,CAAC;CACnD,CAAC;AAEF,eAAO,MAAM,cAAc,EAAE,KAAK,CAAC,EAAE,CAAC,mBAAmB,CAuGxD,CAAC"}
1
+ {"version":3,"file":"SignUpPassword.d.ts","sourceRoot":"","sources":["../../../../../src/auth/screens/SignUpPassword.tsx"],"names":[],"mappings":"AASA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,0BAA0B,CAAC;AAC1D,OAAO,KAAK,MAAM,OAAO,CAAC;AAW1B,KAAK,mBAAmB,GAAG;IACzB,KAAK,EAAE,SAAS,CAAC,aAAa,EAAE,gBAAgB,CAAC,CAAC;CACnD,CAAC;AAEF,eAAO,MAAM,cAAc,EAAE,KAAK,CAAC,EAAE,CAAC,mBAAmB,CA0GxD,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"VerifyPhoneNumber.d.ts","sourceRoot":"","sources":["../../../../../src/auth/screens/VerifyPhoneNumber.tsx"],"names":[],"mappings":"AASA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,0BAA0B,CAAC;AAC1D,OAAO,KAAK,MAAM,OAAO,CAAC;AAW1B,KAAK,4BAA4B,GAAG;IAClC,KAAK,EAAE,SAAS,CAAC,aAAa,EAAE,mBAAmB,CAAC,CAAC;CACtD,CAAC;AAEF,eAAO,MAAM,uBAAuB,EAAE,KAAK,CAAC,EAAE,CAC5C,4BAA4B,CA6E7B,CAAC"}
1
+ {"version":3,"file":"VerifyPhoneNumber.d.ts","sourceRoot":"","sources":["../../../../../src/auth/screens/VerifyPhoneNumber.tsx"],"names":[],"mappings":"AAUA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,0BAA0B,CAAC;AAC1D,OAAO,KAAK,MAAM,OAAO,CAAC;AAW1B,KAAK,4BAA4B,GAAG;IAClC,KAAK,EAAE,SAAS,CAAC,aAAa,EAAE,mBAAmB,CAAC,CAAC;CACtD,CAAC;AAEF,eAAO,MAAM,uBAAuB,EAAE,KAAK,CAAC,EAAE,CAC5C,4BAA4B,CAgF7B,CAAC"}
@@ -5,6 +5,7 @@ import { type ThemeType } from '../theme';
5
5
  type RestyleProps = SpacingProps<ThemeType> & SpacingShorthandProps<ThemeType> & LayoutProps<ThemeType> & PositionProps<ThemeType> & BorderProps<ThemeType> & BackgroundColorProps<ThemeType> & BackgroundColorShorthandProps<ThemeType>;
6
6
  type Props = RestyleProps & TextInputProps & {
7
7
  errorMessage?: string;
8
+ rightIcon?: React.ReactNode;
8
9
  };
9
10
  export declare const TextInputStyled: ({ ...rest }: Props) => JSX.Element;
10
11
  export declare const TextInput: React.FC<Props>;
@@ -1 +1 @@
1
- {"version":3,"file":"TextInput.d.ts","sourceRoot":"","sources":["../../../../src/components/TextInput.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAEL,KAAK,cAAc,EAGpB,MAAM,oBAAoB,CAAC;AAI5B,OAAO,EAML,KAAK,YAAY,EACjB,KAAK,WAAW,EAChB,KAAK,oBAAoB,EAEzB,KAAK,qBAAqB,EAC1B,KAAK,WAAW,EAChB,KAAK,aAAa,EAIlB,KAAK,6BAA6B,EACnC,MAAM,kBAAkB,CAA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,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,SAAS,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;CAC7B,CAAC;AAEJ,eAAO,MAAM,eAAe,gBAAiB,KAAK,gBAIjD,CAAC;AAEF,eAAO,MAAM,SAAS,EAAE,KAAK,CAAC,EAAE,CAAC,KAAK,CA4DrC,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kiosinc/commons-rn",
3
- "version": "0.1.19",
3
+ "version": "0.1.20",
4
4
  "description": "Common Code",
5
5
  "main": "lib/commonjs/index",
6
6
  "module": "lib/module/index",
@@ -7,6 +7,7 @@ import {
7
7
  LinkButton,
8
8
  KeyboardAvoidingView,
9
9
  Snackbar,
10
+ Header,
10
11
  } from '../../components';
11
12
  import { type NavigationProp, useNavigation } from '@react-navigation/native';
12
13
  import React, { useEffect, useState } from 'react';
@@ -64,105 +65,98 @@ export const LoginScreen = () => {
64
65
  };
65
66
 
66
67
  return (
67
- <ParentView px="16" flex={1} justifyContent="center">
68
- <KeyboardAvoidingView
69
- alignSelf="center"
70
- justifyContent={'center'}
71
- width={{ phone: '100%', tablet: 372 }}
72
- >
73
- <View alignItems="center">
74
- <AppLogo />
75
- <Text py="48" variant="titleLarge">
76
- {t('authentication.logIn')}
77
- </Text>
78
- </View>
79
- <Controller
80
- control={control}
81
- render={({ field: { onChange, onBlur, value } }) => {
82
- return (
83
- <TextInput
84
- my="5"
85
- keyboardType="email-address"
86
- autoCapitalize="none"
87
- mode="outlined"
88
- autoComplete="email"
89
- error={!!errors.email?.message}
90
- errorMessage={errors.email?.message}
91
- onBlur={onBlur}
92
- onChangeText={onChange}
93
- value={value}
94
- label={t('authentication.email')}
95
- />
96
- );
97
- }}
98
- name="email"
99
- />
100
- <Controller
101
- control={control}
102
- render={({ field: { onChange, onBlur, value } }) => {
103
- return (
104
- <TextInput
105
- my="5"
106
- secureTextEntry={true}
107
- mode="outlined"
108
- autoComplete="current-password"
109
- error={!!errors.password?.message}
110
- errorMessage={errors.password?.message}
111
- onBlur={onBlur}
112
- onChangeText={onChange}
113
- value={value}
114
- label={t('authentication.password')}
115
- />
116
- );
117
- }}
118
- name="password"
119
- />
120
- <LinkButton
121
- alignSelf="flex-end"
122
- mode="text"
123
- onPress={() => {
124
- navigation.navigate('ResetPassword');
125
- }}
126
- >
127
- {t('authentication.forgotPassword')}
128
- </LinkButton>
129
- <Button
130
- loading={isLoading}
131
- mt="38"
132
- mode="contained"
133
- onPress={handleSubmit(onSubmit)}
68
+ <ParentView px="16">
69
+ <Header />
70
+ <View flex={1} justifyContent={'center'}>
71
+ <KeyboardAvoidingView
72
+ alignSelf="center"
73
+ justifyContent={'center'}
74
+ width={{ phone: '100%', tablet: 372 }}
134
75
  >
135
- {t('authentication.logIn')}
136
- </Button>
137
- {Config.APP_NAME !== 'git' && (
138
- <View
139
- alignItems="center"
140
- justifyContent="center"
141
- pt="8"
142
- flexDirection="row"
143
- >
144
- <Text variant="labelLarge">{t('authentication.newToApp')}</Text>
145
- <LinkButton
146
- mode="text"
147
- onPress={() => {
148
- navigation.navigate('SignUp');
149
- }}
150
- >
151
- {t('authentication.signUp')}
152
- </LinkButton>
76
+ <View alignItems="center">
77
+ <AppLogo />
78
+ <Text py="48" variant="titleLarge">
79
+ {t('authentication.logIn')}
80
+ </Text>
153
81
  </View>
154
- )}
155
- {navigation.canGoBack() && (
82
+ <Controller
83
+ control={control}
84
+ render={({ field: { onChange, onBlur, value } }) => {
85
+ return (
86
+ <TextInput
87
+ my="5"
88
+ keyboardType="email-address"
89
+ autoCapitalize="none"
90
+ mode="outlined"
91
+ autoComplete="email"
92
+ error={!!errors.email?.message}
93
+ errorMessage={errors.email?.message}
94
+ onBlur={onBlur}
95
+ onChangeText={onChange}
96
+ value={value}
97
+ label={t('authentication.email')}
98
+ />
99
+ );
100
+ }}
101
+ name="email"
102
+ />
103
+ <Controller
104
+ control={control}
105
+ render={({ field: { onChange, onBlur, value } }) => {
106
+ return (
107
+ <TextInput
108
+ my="5"
109
+ secureTextEntry={true}
110
+ mode="outlined"
111
+ autoComplete="current-password"
112
+ error={!!errors.password?.message}
113
+ errorMessage={errors.password?.message}
114
+ onBlur={onBlur}
115
+ onChangeText={onChange}
116
+ value={value}
117
+ label={t('authentication.password')}
118
+ />
119
+ );
120
+ }}
121
+ name="password"
122
+ />
156
123
  <LinkButton
124
+ alignSelf="flex-end"
157
125
  mode="text"
158
126
  onPress={() => {
159
- navigation.goBack();
127
+ navigation.navigate('ResetPassword');
160
128
  }}
161
129
  >
162
- {t('cancel')}
130
+ {t('authentication.forgotPassword')}
163
131
  </LinkButton>
164
- )}
165
- </KeyboardAvoidingView>
132
+ <Button
133
+ loading={isLoading}
134
+ mt="38"
135
+ mode="contained"
136
+ onPress={handleSubmit(onSubmit)}
137
+ >
138
+ {t('authentication.logIn')}
139
+ </Button>
140
+ {Config.APP_NAME !== 'git' && (
141
+ <View
142
+ alignItems="center"
143
+ justifyContent="center"
144
+ pt="8"
145
+ flexDirection="row"
146
+ >
147
+ <Text variant="labelLarge">{t('authentication.newToApp')}</Text>
148
+ <LinkButton
149
+ mode="text"
150
+ onPress={() => {
151
+ navigation.navigate('SignUp');
152
+ }}
153
+ >
154
+ {t('authentication.signUp')}
155
+ </LinkButton>
156
+ </View>
157
+ )}
158
+ </KeyboardAvoidingView>
159
+ </View>
166
160
  </ParentView>
167
161
  );
168
162
  };
@@ -5,6 +5,7 @@ import {
5
5
  TextInput,
6
6
  Button,
7
7
  KeyboardAvoidingView,
8
+ Header,
8
9
  } from '../../components';
9
10
  import { type NavigationProp, useNavigation } from '@react-navigation/native';
10
11
  import React from 'react';
@@ -40,49 +41,52 @@ export const ResetPasswordScreen = () => {
40
41
  };
41
42
 
42
43
  return (
43
- <ParentView justifyContent="center" px="16">
44
- <KeyboardAvoidingView
45
- alignSelf="center"
46
- justifyContent={'center'}
47
- width={{ phone: '100%', tablet: 372 }}
48
- >
49
- <View alignItems="center">
50
- <Text py="48" textAlign="center" variant="titleLarge">
51
- {t('authentication.enterYour')}
52
- </Text>
53
- </View>
54
- <Controller
55
- control={control}
56
- render={({ field: { onChange, onBlur, value } }) => {
57
- return (
58
- <TextInput
59
- keyboardType="email-address"
60
- autoCapitalize="none"
61
- mode="outlined"
62
- autoComplete="email"
63
- error={!!errors.email?.message}
64
- errorMessage={errors.email?.message}
65
- onBlur={onBlur}
66
- onChangeText={onChange}
67
- value={value}
68
- label={t('authentication.email')}
69
- />
70
- );
71
- }}
72
- name="email"
73
- />
74
- <Button
75
- loading={isLoading}
76
- mt="16"
77
- mode="contained"
78
- onPress={handleSubmit(onSubmit)}
44
+ <ParentView px="16">
45
+ <Header />
46
+ <View flex={1} justifyContent={'center'}>
47
+ <KeyboardAvoidingView
48
+ alignSelf="center"
49
+ justifyContent={'center'}
50
+ width={{ phone: '100%', tablet: 372 }}
79
51
  >
80
- {t('authentication.resetPassword')}
81
- </Button>
82
- <Button mt="48" mode="outlined" onPress={navigation.goBack}>
83
- {t('cancel')}
84
- </Button>
85
- </KeyboardAvoidingView>
52
+ <View alignItems="center">
53
+ <Text py="48" textAlign="center" variant="titleLarge">
54
+ {t('authentication.enterYour')}
55
+ </Text>
56
+ </View>
57
+ <Controller
58
+ control={control}
59
+ render={({ field: { onChange, onBlur, value } }) => {
60
+ return (
61
+ <TextInput
62
+ keyboardType="email-address"
63
+ autoCapitalize="none"
64
+ mode="outlined"
65
+ autoComplete="email"
66
+ error={!!errors.email?.message}
67
+ errorMessage={errors.email?.message}
68
+ onBlur={onBlur}
69
+ onChangeText={onChange}
70
+ value={value}
71
+ label={t('authentication.email')}
72
+ />
73
+ );
74
+ }}
75
+ name="email"
76
+ />
77
+ <Button
78
+ loading={isLoading}
79
+ mt="16"
80
+ mode="contained"
81
+ onPress={handleSubmit(onSubmit)}
82
+ >
83
+ {t('authentication.resetPassword')}
84
+ </Button>
85
+ <Button mt="48" mode="outlined" onPress={navigation.goBack}>
86
+ {t('cancel')}
87
+ </Button>
88
+ </KeyboardAvoidingView>
89
+ </View>
86
90
  </ParentView>
87
91
  );
88
92
  };
@@ -6,6 +6,7 @@ import {
6
6
  Button,
7
7
  LinkButton,
8
8
  KeyboardAvoidingView,
9
+ Header,
9
10
  } from '../../components';
10
11
  import React from 'react';
11
12
  import { useTranslation } from 'react-i18next';
@@ -59,36 +60,19 @@ export const SignUpScreen = () => {
59
60
 
60
61
  return (
61
62
  <ParentView px="16" justifyContent="center">
62
- <KeyboardAvoidingView
63
- alignSelf="center"
64
- justifyContent={'center'}
65
- width={{ phone: '100%', tablet: 372 }}
66
- >
67
- <View alignItems="center">
68
- <Text pb="40" variant="titleLarge">
69
- {t('authentication.createAccountTitle')}
70
- </Text>
71
- </View>
72
- <View justifyContent="center">
73
- <Controller
74
- control={control}
75
- render={({ field: { onChange, onBlur, value } }) => {
76
- return (
77
- <TextInput
78
- my="5"
79
- mode="outlined"
80
- error={!!errors.displayName?.message}
81
- errorMessage={errors.displayName?.message}
82
- onBlur={onBlur}
83
- onChangeText={onChange}
84
- value={value}
85
- label={t('authentication.displayName')}
86
- />
87
- );
88
- }}
89
- name="displayName"
90
- />
91
- {Config.APP_NAME !== 'gusteau' && (
63
+ <Header />
64
+ <View flex={1} justifyContent={'center'}>
65
+ <KeyboardAvoidingView
66
+ alignSelf="center"
67
+ justifyContent={'center'}
68
+ width={{ phone: '100%', tablet: 372 }}
69
+ >
70
+ <View alignItems="center">
71
+ <Text pb="40" variant="titleLarge">
72
+ {t('authentication.createAccountTitle')}
73
+ </Text>
74
+ </View>
75
+ <View justifyContent="center">
92
76
  <Controller
93
77
  control={control}
94
78
  render={({ field: { onChange, onBlur, value } }) => {
@@ -96,85 +80,105 @@ export const SignUpScreen = () => {
96
80
  <TextInput
97
81
  my="5"
98
82
  mode="outlined"
99
- error={!!errors.name?.message}
100
- errorMessage={errors.name?.message}
83
+ error={!!errors.displayName?.message}
84
+ errorMessage={errors.displayName?.message}
101
85
  onBlur={onBlur}
102
86
  onChangeText={onChange}
103
87
  value={value}
104
- label={t('authentication.businessName')}
88
+ label={t('authentication.displayName')}
105
89
  />
106
90
  );
107
91
  }}
108
- name="name"
92
+ name="displayName"
109
93
  />
110
- )}
111
- <Controller
112
- control={control}
113
- render={({ field: { onChange, onBlur, value } }) => {
114
- return (
115
- <TextInput
116
- my="5"
117
- autoCapitalize="none"
118
- keyboardType="email-address"
119
- mode="outlined"
120
- autoComplete="email"
121
- error={!!errors.email?.message}
122
- errorMessage={errors.email?.message}
123
- onBlur={onBlur}
124
- onChangeText={onChange}
125
- value={value}
126
- label={t('authentication.email')}
127
- />
128
- );
129
- }}
130
- name="email"
131
- />
132
- <Controller
133
- control={control}
134
- render={({ field: { onChange, onBlur, value } }) => {
135
- return (
136
- <TextInput
137
- my="5"
138
- mode="outlined"
139
- error={!!errors.phoneNumber?.message}
140
- errorMessage={errors.phoneNumber?.message}
141
- onBlur={onBlur}
142
- onChangeText={onChange}
143
- value={value}
144
- label={t('authentication.phoneNumber')}
145
- />
146
- );
147
- }}
148
- name="phoneNumber"
149
- />
150
- </View>
151
- <Button
152
- loading={isCheckingIsRegistered}
153
- mt="48"
154
- onPress={handleSubmit(onSubmit)}
155
- mode="contained"
156
- >
157
- {t('authentication.createAccount')}
158
- </Button>
159
- <View flexDirection="row" flexWrap="wrap" pt="10">
160
- <Text>{t('authentication.byContinue')}</Text>
161
- <LinkButton
162
- labelStyle={style.termsAndConditions}
163
- mode="text"
164
- onPress={() => Linking.openURL(TERMS_OF_SERVICE)}
165
- >
166
- {t('authentication.termsAndConditions')}
167
- </LinkButton>
168
- <Text>{t('authentication.and')}</Text>
169
- <LinkButton
170
- labelStyle={style.privacyPolicy}
171
- mode="text"
172
- onPress={() => Linking.openURL(PRIVACY_POLICY)}
94
+ {Config.APP_NAME !== 'gusteau' && (
95
+ <Controller
96
+ control={control}
97
+ render={({ field: { onChange, onBlur, value } }) => {
98
+ return (
99
+ <TextInput
100
+ my="5"
101
+ mode="outlined"
102
+ error={!!errors.name?.message}
103
+ errorMessage={errors.name?.message}
104
+ onBlur={onBlur}
105
+ onChangeText={onChange}
106
+ value={value}
107
+ label={t('authentication.businessName')}
108
+ />
109
+ );
110
+ }}
111
+ name="name"
112
+ />
113
+ )}
114
+ <Controller
115
+ control={control}
116
+ render={({ field: { onChange, onBlur, value } }) => {
117
+ return (
118
+ <TextInput
119
+ my="5"
120
+ autoCapitalize="none"
121
+ keyboardType="email-address"
122
+ mode="outlined"
123
+ autoComplete="email"
124
+ error={!!errors.email?.message}
125
+ errorMessage={errors.email?.message}
126
+ onBlur={onBlur}
127
+ onChangeText={onChange}
128
+ value={value}
129
+ label={t('authentication.email')}
130
+ />
131
+ );
132
+ }}
133
+ name="email"
134
+ />
135
+ <Controller
136
+ control={control}
137
+ render={({ field: { onChange, onBlur, value } }) => {
138
+ return (
139
+ <TextInput
140
+ my="5"
141
+ mode="outlined"
142
+ error={!!errors.phoneNumber?.message}
143
+ errorMessage={errors.phoneNumber?.message}
144
+ onBlur={onBlur}
145
+ onChangeText={onChange}
146
+ value={value}
147
+ label={t('authentication.phoneNumber')}
148
+ />
149
+ );
150
+ }}
151
+ name="phoneNumber"
152
+ />
153
+ </View>
154
+ <Button
155
+ loading={isCheckingIsRegistered}
156
+ mt="48"
157
+ onPress={handleSubmit(onSubmit)}
158
+ mode="contained"
173
159
  >
174
- {t('authentication.privacyPolicy')}
175
- </LinkButton>
176
- </View>
177
- </KeyboardAvoidingView>
160
+ {t('authentication.createAccount')}
161
+ </Button>
162
+ <View flexDirection="row" flexWrap="wrap" pt="10">
163
+ <Text>{t('authentication.byContinue')}</Text>
164
+ <LinkButton
165
+ labelStyle={style.termsAndConditions}
166
+ mode="text"
167
+ onPress={() => Linking.openURL(TERMS_OF_SERVICE)}
168
+ >
169
+ {t('authentication.termsAndConditions')}
170
+ </LinkButton>
171
+ <Text>{t('authentication.and')}</Text>
172
+ <LinkButton
173
+ labelStyle={style.privacyPolicy}
174
+ mode="text"
175
+ onPress={() => Linking.openURL(PRIVACY_POLICY)}
176
+ >
177
+ {t('authentication.privacyPolicy')}
178
+ </LinkButton>
179
+ </View>
180
+ </KeyboardAvoidingView>
181
+ </View>
178
182
  </ParentView>
179
183
  );
180
184
  };