-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathApp.js
88 lines (84 loc) · 1.91 KB
/
App.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
import { SafeAreaProvider } from "react-native-safe-area-context";
import Amplify from "aws-amplify";
import config from "./src/aws-exports";
import { withAuthenticator } from "aws-amplify-react-native";
import MainContainer from "./src/navigation/MainContainer";
import { StatusBar } from "react-native";
import { Provider } from "react-redux";
import store from "./src/store";
if (__DEV__) {
import("./ReactotronConfig").then(() => console.log("Reactotron Configured"));
}
Amplify.configure({
...config,
Analytics: {
disabled: true,
},
});
function App() {
return (
<Provider store={store}>
<SafeAreaProvider>
<StatusBar />
<MainContainer />
</SafeAreaProvider>
</Provider>
);
}
const signUpConfig = {
hideAllDefaults: true,
signUpFields: [
{
label: "Email",
key: "email",
required: true,
type: "string",
placeholder: "Enter your email",
displayOrder: 1,
},
{
label: "Password",
key: "password",
required: true,
type: "password",
placeholder: "Enter a password",
displayOrder: 2,
},
{
label: "Given Name",
key: "given_name",
required: true,
type: "string",
placeholder: "Enter your first name",
displayOrder: 3,
},
{
label: "Family Name",
key: "family_name",
required: true,
type: "string",
placeholder: "Enter your last name",
displayOrder: 4,
},
{
label: "Phone Number",
key: "phone_number",
required: true,
type: "phone_number",
placeholder: "Enter your phone number",
displayOrder: 5,
},
{
label: "Address",
key: "address",
required: true,
type: "string",
placeholder: "Enter your address",
displayOrder: 6,
},
],
};
export default withAuthenticator(App, {
signUpConfig: signUpConfig,
usernameAttributes: "email",
});