Selaa lähdekoodia

Podemos registrarnos en la base de datos

ErnestoOrtiz2 2 vuotta sitten
vanhempi
commit
ff41753e7d

+ 71
- 31
App.js Näytä tiedosto

@@ -1,27 +1,16 @@
1
-import { StatusBar } from 'expo-status-bar';
2
-import React from 'react';
3
-import { StyleSheet, Text, View } from 'react-native';
4
-
5
-
6
-export default function App() {
7
-  return (
8
-    <View style={styles.container}>
9
-      <Text>"Hello"</Text>
10
-      <StatusBar style="auto" />
11
-    </View>
12
-  );
13
-}
1
+import React, { Component } from 'react';
2
+import firebase from 'firebase'
3
+import { NavigationContainer } from '@react-navigation/native';
4
+import { createStackNavigator } from '@react-navigation/stack';
14 5
 
6
+import RegisterScreen from './screens/RegisterScreen';
7
+import LoginScreen from './screens/LoginScreen';
8
+import { firebaseConfig } from './config/firebaseConfig';
9
+import { Text, View } from 'react-native';
10
+import { styles } from './config/styles';
15 11
 
16
-// Import the functions you need from the SDKs you need
17
-// import { initializeApp } from "firebase/app";
18
-import firebase  from 'firebase';
19
-// expo install firebase
20
-// TODO: Add SDKs for Firebase products that you want to use
21
-// https://firebase.google.com/docs/web/setup#available-libraries
22 12
 
23
-// Your web app's Firebase configuration
24
-const firebaseConfig = {
13
+/*const seConfig = {
25 14
   apiKey: "AIzaSyDW-ABAQ3r_WR7C7WC_3VprL77NcAoitJI",
26 15
   authDomain: "freehand-d8ecd.firebaseapp.com",
27 16
   projectId: "freehand-d8ecd",
@@ -29,16 +18,67 @@ const firebaseConfig = {
29 18
   messagingSenderId: "48371388186",
30 19
   appId: "1:48371388186:web:9a5a4bf1218e17ac6326a3"
31 20
 };
32
-
21
+*/
33 22
 // Initialize Firebase
34
-const app = firebase.initializeApp(firebaseConfig);
23
+//const app = firebase.initializeApp(seConfig);
24
+if (firebase.apps.length === 0) {
25
+  firebase.initializeApp(firebaseConfig)
26
+}
27
+
28
+const Stack = createStackNavigator();
29
+
30
+export default class App extends Component {
31
+  constructor(props){
32
+    super(props);
33
+    this.state = {
34
+      loaded: false,
35
+    }
36
+  }
37
+  
38
+  componentDidMount(){
39
+    firebase.auth().onAuthStateChanged((user) => {
40
+      if (!user){
41
+        this.setState({
42
+          loggedIn: false,
43
+          loaded: true,
44
+        })
45
+      }
46
+      else{
47
+        this.setState({
48
+          loggedIn: true,
49
+          loaded: true,
50
+        })
51
+      }
52
+    })
53
+  }
35 54
 
55
+  render() {
36 56
 
37
-const styles = StyleSheet.create({
38
-  container: {
39
-    flex: 1,
40
-    backgroundColor: '#fff',
41
-    alignItems: 'center',
42
-    justifyContent: 'center',
43
-  },
44
-});
57
+    const { loggedIn, loaded } = this.state
58
+
59
+    if(!loaded){
60
+      return(
61
+        <View style={styles.regcontainer}>
62
+          <Text>Hopper</Text>
63
+        </View>
64
+      );
65
+    }
66
+
67
+    if(!loggedIn){
68
+      return (
69
+        <NavigationContainer>
70
+          <Stack.Navigator>
71
+            <Stack.Screen name={" "} options={{headerShown: false}} component={LoginScreen}/>
72
+            <Stack.Screen name={"Register"} options={{headerTransparent: true, headerTitle: " "}} component={RegisterScreen}/>
73
+          </Stack.Navigator>
74
+        </NavigationContainer>
75
+      );
76
+    }
77
+
78
+    return(
79
+      <View style={styles.regcontainer}>
80
+        <Text>Cheese</Text>
81
+      </View>
82
+    );
83
+  }
84
+}

BIN
assets/open-hand.png Näytä tiedosto


BIN
assets/yellow-white.jpg Näytä tiedosto


+ 15
- 0
components/CustomButton.js Näytä tiedosto

@@ -0,0 +1,15 @@
1
+import React from 'react';
2
+import { Text, TouchableOpacity } from 'react-native';
3
+
4
+import { styles } from '../config/styles';
5
+import colors from '../config/colors';
6
+
7
+function CustomButton( {title, onPress, color = "skyblue", marginTop} ) {
8
+    return (
9
+        <TouchableOpacity style={[styles.regbutton, { backgroundColor: colors[color] }, { marginTop: marginTop }]} onPress={onPress}>
10
+            <Text style={styles.regbuttontext}>{title}</Text>
11
+        </TouchableOpacity>
12
+    );
13
+}
14
+
15
+export default CustomButton;

+ 5
- 0
config/colors.js Näytä tiedosto

@@ -0,0 +1,5 @@
1
+export default {
2
+        softpink: '#FFF0F5',
3
+        skyblue: '#87CEFA',
4
+        white: '#FFFFFF'
5
+}

+ 8
- 0
config/firebaseConfig.js Näytä tiedosto

@@ -0,0 +1,8 @@
1
+export const firebaseConfig = {
2
+  apiKey: "AIzaSyDW-ABAQ3r_WR7C7WC_3VprL77NcAoitJI",
3
+  authDomain: "freehand-d8ecd.firebaseapp.com",
4
+  projectId: "freehand-d8ecd",
5
+  storageBucket: "freehand-d8ecd.appspot.com",
6
+  messagingSenderId: "48371388186",
7
+  appId: "1:48371388186:web:9a5a4bf1218e17ac6326a3"
8
+};

+ 61
- 0
config/styles.js Näytä tiedosto

@@ -0,0 +1,61 @@
1
+import { StyleSheet } from "react-native"
2
+
3
+import colors from "./colors"
4
+
5
+export const styles = StyleSheet.create({
6
+    stdcontainer: {
7
+        flex: 1,
8
+        justifyContent: 'flex-start',
9
+        alignItems: 'center'
10
+    },
11
+
12
+    regcontainer: {
13
+        flex: 1,
14
+        justifyContent: 'center',
15
+        alignItems: 'center',
16
+    },
17
+
18
+    regbutton:{
19
+        backgroundColor: colors.skyblue,
20
+        justifyContent: 'center',
21
+        alignItems: 'center',
22
+        width: '50%',
23
+        height: '5%',
24
+    },
25
+
26
+    regtxtfield: {
27
+        backgroundColor: colors.softpink,
28
+        width: '75%',
29
+        height: '5%',
30
+        borderRadius: 25,
31
+        paddingLeft: 20,
32
+        paddingRight: 20,
33
+        margin: 20,
34
+    },
35
+
36
+    regbuttontext: {
37
+        color: colors.white,
38
+        fontSize: 17
39
+    },
40
+
41
+    logo: {
42
+        width: "25%",
43
+        height: "25%",
44
+        top: 50,
45
+        marginBottom: 200
46
+    },
47
+
48
+    loginbutton: {
49
+        position: 'absolute',
50
+        bottom: 50,
51
+    },
52
+
53
+    picker: {
54
+        width: '50%',
55
+    },
56
+
57
+    qsttxt: {
58
+        marginTop: 20,
59
+        fontWeight: "bold"
60
+    }
61
+})

+ 514
- 0
package-lock.json Näytä tiedosto

@@ -5,6 +5,9 @@
5 5
   "packages": {
6 6
     "": {
7 7
       "dependencies": {
8
+        "@react-native-picker/picker": "^2.1.0",
9
+        "@react-navigation/native": "^6.0.4",
10
+        "@react-navigation/stack": "^6.0.9",
8 11
         "expo": "~42.0.1",
9 12
         "expo-status-bar": "~1.0.4",
10 13
         "firebase": "8.2.3",
@@ -1727,6 +1730,18 @@
1727 1730
         "node": ">=0.1.95"
1728 1731
       }
1729 1732
     },
1733
+    "node_modules/@egjs/hammerjs": {
1734
+      "version": "2.0.17",
1735
+      "resolved": "https://registry.npmjs.org/@egjs/hammerjs/-/hammerjs-2.0.17.tgz",
1736
+      "integrity": "sha512-XQsZgjm2EcVUiZQf11UBJQfmZeEmOW8DpI1gsFeln6w0ae0ii4dMQEQ0kjl6DspdWX1aGY1/loyXnP0JS06e/A==",
1737
+      "peer": true,
1738
+      "dependencies": {
1739
+        "@types/hammerjs": "^2.0.36"
1740
+      },
1741
+      "engines": {
1742
+        "node": ">=0.8.0"
1743
+      }
1744
+    },
1730 1745
     "node_modules/@expo/config": {
1731 1746
       "version": "5.0.9",
1732 1747
       "resolved": "https://registry.npmjs.org/@expo/config/-/config-5.0.9.tgz",
@@ -3180,6 +3195,103 @@
3180 3195
       "resolved": "https://registry.npmjs.org/@react-native-community/cli-types/-/cli-types-4.10.1.tgz",
3181 3196
       "integrity": "sha512-ael2f1onoPF3vF7YqHGWy7NnafzGu+yp88BbFbP0ydoCP2xGSUzmZVw0zakPTC040Id+JQ9WeFczujMkDy6jYQ=="
3182 3197
     },
3198
+    "node_modules/@react-native-picker/picker": {
3199
+      "version": "2.1.0",
3200
+      "resolved": "https://registry.npmjs.org/@react-native-picker/picker/-/picker-2.1.0.tgz",
3201
+      "integrity": "sha512-iJ/QaDrBMBaW6cFuQyR3DXzcn2h7c5O7mGgmNLCBQHTTtLNBZR+Sxogy6YleFPeToNdysG5mTTkXqBmlWHMQqg==",
3202
+      "peerDependencies": {
3203
+        "react": "16 || 17",
3204
+        "react-native": ">=0.57"
3205
+      }
3206
+    },
3207
+    "node_modules/@react-navigation/native": {
3208
+      "version": "6.0.4",
3209
+      "resolved": "https://registry.npmjs.org/@react-navigation/native/-/native-6.0.4.tgz",
3210
+      "integrity": "sha512-497dGGDIZ8hDCPGj6GXZvLGHk6NvZk5k4r1cjwgqcXwutK5fS7sgD0dZP52NTQC3GvLe8PZNv6AEdMIqFrZK6A==",
3211
+      "dependencies": {
3212
+        "@react-navigation/core": "^6.0.2",
3213
+        "escape-string-regexp": "^4.0.0",
3214
+        "nanoid": "^3.1.23"
3215
+      },
3216
+      "peerDependencies": {
3217
+        "react": "*",
3218
+        "react-native": "*"
3219
+      }
3220
+    },
3221
+    "node_modules/@react-navigation/native/node_modules/@react-navigation/core": {
3222
+      "version": "6.0.2",
3223
+      "resolved": "https://registry.npmjs.org/@react-navigation/core/-/core-6.0.2.tgz",
3224
+      "integrity": "sha512-Omsb670qmNfO0KGiRrOE+KXpCYQ6jXxE5uCPnj5srW31s6YDGiFl/M5sRcMyBdDXLXp5HjkQTJpU9ilmjKtL5g==",
3225
+      "dependencies": {
3226
+        "@react-navigation/routers": "^6.0.1",
3227
+        "escape-string-regexp": "^4.0.0",
3228
+        "nanoid": "^3.1.23",
3229
+        "query-string": "^7.0.0",
3230
+        "react-is": "^16.13.0"
3231
+      },
3232
+      "peerDependencies": {
3233
+        "react": "*"
3234
+      }
3235
+    },
3236
+    "node_modules/@react-navigation/native/node_modules/escape-string-regexp": {
3237
+      "version": "4.0.0",
3238
+      "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz",
3239
+      "integrity": "sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==",
3240
+      "engines": {
3241
+        "node": ">=10"
3242
+      },
3243
+      "funding": {
3244
+        "url": "https://github.com/sponsors/sindresorhus"
3245
+      }
3246
+    },
3247
+    "node_modules/@react-navigation/native/node_modules/react-is": {
3248
+      "version": "16.13.1",
3249
+      "resolved": "https://registry.npmjs.org/react-is/-/react-is-16.13.1.tgz",
3250
+      "integrity": "sha512-24e6ynE2H+OKt4kqsOvNd8kBpV65zoxbA4BVsEOB3ARVWQki/DHzaUoC5KuON/BiccDaCCTZBuOcfZs70kR8bQ=="
3251
+    },
3252
+    "node_modules/@react-navigation/routers": {
3253
+      "version": "6.0.1",
3254
+      "resolved": "https://registry.npmjs.org/@react-navigation/routers/-/routers-6.0.1.tgz",
3255
+      "integrity": "sha512-5ctB49rmtTRQuTSBVgqMsEzBUjPP2ByUzBjNivA7jmvk+PDCl4oZsiR8KAm/twhxe215GYThfi2vUWXKAg6EEQ==",
3256
+      "dependencies": {
3257
+        "nanoid": "^3.1.23"
3258
+      }
3259
+    },
3260
+    "node_modules/@react-navigation/stack": {
3261
+      "version": "6.0.9",
3262
+      "resolved": "https://registry.npmjs.org/@react-navigation/stack/-/stack-6.0.9.tgz",
3263
+      "integrity": "sha512-LV9MlxqOH6+wgU7LxhaTRSY+WTuzNa2NnOCji9nyAA4Xohp9tpuLhYJRYdNRWXBcfseBqz1o4L0LAxRMv+CXYQ==",
3264
+      "dependencies": {
3265
+        "@react-navigation/elements": "^1.1.2",
3266
+        "color": "^3.1.3",
3267
+        "warn-once": "^0.1.0"
3268
+      },
3269
+      "peerDependencies": {
3270
+        "@react-navigation/native": "^6.0.0",
3271
+        "react": "*",
3272
+        "react-native": "*",
3273
+        "react-native-gesture-handler": ">= 1.0.0",
3274
+        "react-native-safe-area-context": ">= 3.0.0",
3275
+        "react-native-screens": ">= 3.0.0"
3276
+      }
3277
+    },
3278
+    "node_modules/@react-navigation/stack/node_modules/@react-navigation/elements": {
3279
+      "version": "1.1.2",
3280
+      "resolved": "https://registry.npmjs.org/@react-navigation/elements/-/elements-1.1.2.tgz",
3281
+      "integrity": "sha512-PbPCleC1HpUlXtuP0DFNCNTEhRLd6lmB0KxY0SGRGqCemS3HpG/PajEQ1LDe7S51M03a1tDby1MfKTkNanUXAg==",
3282
+      "peerDependencies": {
3283
+        "@react-navigation/native": "^6.0.0",
3284
+        "react": "*",
3285
+        "react-native": "*",
3286
+        "react-native-safe-area-context": ">= 3.0.0"
3287
+      }
3288
+    },
3289
+    "node_modules/@types/hammerjs": {
3290
+      "version": "2.0.40",
3291
+      "resolved": "https://registry.npmjs.org/@types/hammerjs/-/hammerjs-2.0.40.tgz",
3292
+      "integrity": "sha512-VbjwR1fhsn2h2KXAY4oy1fm7dCxaKy0D+deTb8Ilc3Eo3rc5+5eA4rfYmZaHgNJKxVyI0f6WIXzO2zLkVmQPHA==",
3293
+      "peer": true
3294
+    },
3183 3295
     "node_modules/@types/istanbul-lib-coverage": {
3184 3296
       "version": "2.0.3",
3185 3297
       "resolved": "https://registry.npmjs.org/@types/istanbul-lib-coverage/-/istanbul-lib-coverage-2.0.3.tgz",
@@ -4257,6 +4369,15 @@
4257 4369
         "node": ">=0.10.0"
4258 4370
       }
4259 4371
     },
4372
+    "node_modules/color": {
4373
+      "version": "3.2.1",
4374
+      "resolved": "https://registry.npmjs.org/color/-/color-3.2.1.tgz",
4375
+      "integrity": "sha512-aBl7dZI9ENN6fUGC7mWpMTPNHmWUSNan9tuWN6ahh5ZLNk9baLJOnSMlrQkHcrfFgz2/RigjUVAjdx36VcemKA==",
4376
+      "dependencies": {
4377
+        "color-convert": "^1.9.3",
4378
+        "color-string": "^1.6.0"
4379
+      }
4380
+    },
4260 4381
     "node_modules/color-convert": {
4261 4382
       "version": "1.9.3",
4262 4383
       "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz",
@@ -4270,6 +4391,15 @@
4270 4391
       "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz",
4271 4392
       "integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU="
4272 4393
     },
4394
+    "node_modules/color-string": {
4395
+      "version": "1.6.0",
4396
+      "resolved": "https://registry.npmjs.org/color-string/-/color-string-1.6.0.tgz",
4397
+      "integrity": "sha512-c/hGS+kRWJutUBEngKKmk4iH3sD59MBkoxVapS/0wgpCz2u7XsNloxknyvBhzwEs1IbV36D9PwqLPJ2DTu3vMA==",
4398
+      "dependencies": {
4399
+        "color-name": "^1.0.0",
4400
+        "simple-swizzle": "^0.2.2"
4401
+      }
4402
+    },
4273 4403
     "node_modules/color-support": {
4274 4404
       "version": "1.1.3",
4275 4405
       "resolved": "https://registry.npmjs.org/color-support/-/color-support-1.1.3.tgz",
@@ -4469,6 +4599,24 @@
4469 4599
         "object-assign": "^4.1.1"
4470 4600
       }
4471 4601
     },
4602
+    "node_modules/cross-fetch": {
4603
+      "version": "3.1.4",
4604
+      "resolved": "https://registry.npmjs.org/cross-fetch/-/cross-fetch-3.1.4.tgz",
4605
+      "integrity": "sha512-1eAtFWdIubi6T4XPy6ei9iUFoKpUkIF971QLN8lIvvvwueI65+Nw5haMNKUwfJxabqlIIDODJKGrQ66gxC0PbQ==",
4606
+      "peer": true,
4607
+      "dependencies": {
4608
+        "node-fetch": "2.6.1"
4609
+      }
4610
+    },
4611
+    "node_modules/cross-fetch/node_modules/node-fetch": {
4612
+      "version": "2.6.1",
4613
+      "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.6.1.tgz",
4614
+      "integrity": "sha512-V4aYg89jEoVRxRb2fJdAg8FHvI7cEyYdVAh94HH0UIK8oJxUfkjlDQN9RbMx+bEjP7+ggMiFRprSti032Oipxw==",
4615
+      "peer": true,
4616
+      "engines": {
4617
+        "node": "4.x || >=6.0.0"
4618
+      }
4619
+    },
4472 4620
     "node_modules/cross-spawn": {
4473 4621
       "version": "6.0.5",
4474 4622
       "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-6.0.5.tgz",
@@ -5597,6 +5745,14 @@
5597 5745
         "node": ">=8"
5598 5746
       }
5599 5747
     },
5748
+    "node_modules/filter-obj": {
5749
+      "version": "1.1.0",
5750
+      "resolved": "https://registry.npmjs.org/filter-obj/-/filter-obj-1.1.0.tgz",
5751
+      "integrity": "sha1-mzERErxsYSehbgFsbF1/GeCAXFs=",
5752
+      "engines": {
5753
+        "node": ">=0.10.0"
5754
+      }
5755
+    },
5600 5756
     "node_modules/finalhandler": {
5601 5757
       "version": "1.1.2",
5602 5758
       "resolved": "https://registry.npmjs.org/finalhandler/-/finalhandler-1.1.2.tgz",
@@ -5992,6 +6148,21 @@
5992 6148
         "node": ">= 8"
5993 6149
       }
5994 6150
     },
6151
+    "node_modules/hoist-non-react-statics": {
6152
+      "version": "3.3.2",
6153
+      "resolved": "https://registry.npmjs.org/hoist-non-react-statics/-/hoist-non-react-statics-3.3.2.tgz",
6154
+      "integrity": "sha512-/gGivxi8JPKWNm/W0jSmzcMPpfpPLc3dY/6GxhX2hQ9iGj3aDfklV4ET7NjKpSinLpJ5vafa9iiGIEZg10SfBw==",
6155
+      "peer": true,
6156
+      "dependencies": {
6157
+        "react-is": "^16.7.0"
6158
+      }
6159
+    },
6160
+    "node_modules/hoist-non-react-statics/node_modules/react-is": {
6161
+      "version": "16.13.1",
6162
+      "resolved": "https://registry.npmjs.org/react-is/-/react-is-16.13.1.tgz",
6163
+      "integrity": "sha512-24e6ynE2H+OKt4kqsOvNd8kBpV65zoxbA4BVsEOB3ARVWQki/DHzaUoC5KuON/BiccDaCCTZBuOcfZs70kR8bQ==",
6164
+      "peer": true
6165
+    },
5995 6166
     "node_modules/http-errors": {
5996 6167
       "version": "1.7.3",
5997 6168
       "resolved": "https://registry.npmjs.org/http-errors/-/http-errors-1.7.3.tgz",
@@ -8126,6 +8297,17 @@
8126 8297
       "resolved": "https://registry.npmjs.org/nanocolors/-/nanocolors-0.1.12.tgz",
8127 8298
       "integrity": "sha512-2nMHqg1x5PU+unxX7PGY7AuYxl2qDx7PSrTRjizr8sxdd3l/3hBuWWaki62qmtYm2U5i4Z5E7GbjlyDFhs9/EQ=="
8128 8299
     },
8300
+    "node_modules/nanoid": {
8301
+      "version": "3.1.28",
8302
+      "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.1.28.tgz",
8303
+      "integrity": "sha512-gSu9VZ2HtmoKYe/lmyPFES5nknFrHa+/DT9muUFWFMi6Jh9E1I7bkvlQ8xxf1Kos9pi9o8lBnIOkatMhKX/YUw==",
8304
+      "bin": {
8305
+        "nanoid": "bin/nanoid.cjs"
8306
+      },
8307
+      "engines": {
8308
+        "node": "^10 || ^12 || ^13.7 || ^14 || >=15.0.1"
8309
+      }
8310
+    },
8129 8311
     "node_modules/nanomatch": {
8130 8312
       "version": "1.2.13",
8131 8313
       "resolved": "https://registry.npmjs.org/nanomatch/-/nanomatch-1.2.13.tgz",
@@ -8904,6 +9086,23 @@
8904 9086
         "once": "^1.3.1"
8905 9087
       }
8906 9088
     },
9089
+    "node_modules/query-string": {
9090
+      "version": "7.0.1",
9091
+      "resolved": "https://registry.npmjs.org/query-string/-/query-string-7.0.1.tgz",
9092
+      "integrity": "sha512-uIw3iRvHnk9to1blJCG3BTc+Ro56CBowJXKmNNAm3RulvPBzWLRqKSiiDk+IplJhsydwtuNMHi8UGQFcCLVfkA==",
9093
+      "dependencies": {
9094
+        "decode-uri-component": "^0.2.0",
9095
+        "filter-obj": "^1.1.0",
9096
+        "split-on-first": "^1.0.0",
9097
+        "strict-uri-encode": "^2.0.0"
9098
+      },
9099
+      "engines": {
9100
+        "node": ">=6"
9101
+      },
9102
+      "funding": {
9103
+        "url": "https://github.com/sponsors/sindresorhus"
9104
+      }
9105
+    },
8907 9106
     "node_modules/querystringify": {
8908 9107
       "version": "2.2.0",
8909 9108
       "resolved": "https://registry.npmjs.org/querystringify/-/querystringify-2.2.0.tgz",
@@ -9021,6 +9220,57 @@
9021 9220
         "react": "16.13.1"
9022 9221
       }
9023 9222
     },
9223
+    "node_modules/react-native-gesture-handler": {
9224
+      "version": "1.10.3",
9225
+      "resolved": "https://registry.npmjs.org/react-native-gesture-handler/-/react-native-gesture-handler-1.10.3.tgz",
9226
+      "integrity": "sha512-cBGMi1IEsIVMgoox4RvMx7V2r6bNKw0uR1Mu1o7NbuHS6BRSVLq0dP34l2ecnPlC+jpWd3le6Yg1nrdCjby2Mw==",
9227
+      "peer": true,
9228
+      "dependencies": {
9229
+        "@egjs/hammerjs": "^2.0.17",
9230
+        "fbjs": "^3.0.0",
9231
+        "hoist-non-react-statics": "^3.3.0",
9232
+        "invariant": "^2.2.4",
9233
+        "prop-types": "^15.7.2"
9234
+      }
9235
+    },
9236
+    "node_modules/react-native-gesture-handler/node_modules/fbjs": {
9237
+      "version": "3.0.0",
9238
+      "resolved": "https://registry.npmjs.org/fbjs/-/fbjs-3.0.0.tgz",
9239
+      "integrity": "sha512-dJd4PiDOFuhe7vk4F80Mba83Vr2QuK86FoxtgPmzBqEJahncp+13YCmfoa53KHCo6OnlXLG7eeMWPfB5CrpVKg==",
9240
+      "peer": true,
9241
+      "dependencies": {
9242
+        "cross-fetch": "^3.0.4",
9243
+        "fbjs-css-vars": "^1.0.0",
9244
+        "loose-envify": "^1.0.0",
9245
+        "object-assign": "^4.1.0",
9246
+        "promise": "^7.1.1",
9247
+        "setimmediate": "^1.0.5",
9248
+        "ua-parser-js": "^0.7.18"
9249
+      }
9250
+    },
9251
+    "node_modules/react-native-safe-area-context": {
9252
+      "version": "3.3.2",
9253
+      "resolved": "https://registry.npmjs.org/react-native-safe-area-context/-/react-native-safe-area-context-3.3.2.tgz",
9254
+      "integrity": "sha512-yOwiiPJ1rk+/nfK13eafbpW6sKW0jOnsRem2C1LPJjM3tfTof6hlvV5eWHATye3XOpu2cJ7N+HdkUvUDGwFD2Q==",
9255
+      "peer": true,
9256
+      "peerDependencies": {
9257
+        "react": "*",
9258
+        "react-native": "*"
9259
+      }
9260
+    },
9261
+    "node_modules/react-native-screens": {
9262
+      "version": "3.8.0",
9263
+      "resolved": "https://registry.npmjs.org/react-native-screens/-/react-native-screens-3.8.0.tgz",
9264
+      "integrity": "sha512-lHrnB/elAoMJKv8O12U6BLgeup4lB6ZKJHEOVuG/D72nv/OE9wUusbou6YCB5tp3YbaSpHflPnkFmHA/vCejpw==",
9265
+      "peer": true,
9266
+      "dependencies": {
9267
+        "warn-once": "^0.1.0"
9268
+      },
9269
+      "peerDependencies": {
9270
+        "react": "*",
9271
+        "react-native": "*"
9272
+      }
9273
+    },
9024 9274
     "node_modules/react-native-web": {
9025 9275
       "version": "0.13.18",
9026 9276
       "resolved": "https://registry.npmjs.org/react-native-web/-/react-native-web-0.13.18.tgz",
@@ -10089,6 +10339,19 @@
10089 10339
         "plist": "^3.0.1"
10090 10340
       }
10091 10341
     },
10342
+    "node_modules/simple-swizzle": {
10343
+      "version": "0.2.2",
10344
+      "resolved": "https://registry.npmjs.org/simple-swizzle/-/simple-swizzle-0.2.2.tgz",
10345
+      "integrity": "sha1-pNprY1/8zMoz9w0Xy5JZLeleVXo=",
10346
+      "dependencies": {
10347
+        "is-arrayish": "^0.3.1"
10348
+      }
10349
+    },
10350
+    "node_modules/simple-swizzle/node_modules/is-arrayish": {
10351
+      "version": "0.3.2",
10352
+      "resolved": "https://registry.npmjs.org/is-arrayish/-/is-arrayish-0.3.2.tgz",
10353
+      "integrity": "sha512-eVRqCvVlZbuw3GrM63ovNSNAeA1K16kaR/LRY/92w0zxQ5/1YzwblUX652i4Xs9RwAGjW9d9y6X88t8OaAJfWQ=="
10354
+    },
10092 10355
     "node_modules/slash": {
10093 10356
       "version": "3.0.0",
10094 10357
       "resolved": "https://registry.npmjs.org/slash/-/slash-3.0.0.tgz",
@@ -10332,6 +10595,14 @@
10332 10595
       "resolved": "https://registry.npmjs.org/source-map-url/-/source-map-url-0.4.1.tgz",
10333 10596
       "integrity": "sha512-cPiFOTLUKvJFIg4SKVScy4ilPPW6rFgMgfuZJPNoDuMs3nC1HbMUycBoJw77xFIp6z1UJQJOfx6C9GMH80DiTw=="
10334 10597
     },
10598
+    "node_modules/split-on-first": {
10599
+      "version": "1.1.0",
10600
+      "resolved": "https://registry.npmjs.org/split-on-first/-/split-on-first-1.1.0.tgz",
10601
+      "integrity": "sha512-43ZssAJaMusuKWL8sKUBQXHWOpq8d6CfN/u1p4gUzfJkM05C8rxTmYrkIPTXapZpORA6LkkzcUulJ8FqA7Uudw==",
10602
+      "engines": {
10603
+        "node": ">=6"
10604
+      }
10605
+    },
10335 10606
     "node_modules/split-string": {
10336 10607
       "version": "3.1.0",
10337 10608
       "resolved": "https://registry.npmjs.org/split-string/-/split-string-3.1.0.tgz",
@@ -10499,6 +10770,14 @@
10499 10770
         "node": ">= 0.10.0"
10500 10771
       }
10501 10772
     },
10773
+    "node_modules/strict-uri-encode": {
10774
+      "version": "2.0.0",
10775
+      "resolved": "https://registry.npmjs.org/strict-uri-encode/-/strict-uri-encode-2.0.0.tgz",
10776
+      "integrity": "sha1-ucczDHBChi9rFC3CdLvMWGbONUY=",
10777
+      "engines": {
10778
+        "node": ">=4"
10779
+      }
10780
+    },
10502 10781
     "node_modules/string_decoder": {
10503 10782
       "version": "1.1.1",
10504 10783
       "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz",
@@ -11050,6 +11329,11 @@
11050 11329
         "makeerror": "1.0.x"
11051 11330
       }
11052 11331
     },
11332
+    "node_modules/warn-once": {
11333
+      "version": "0.1.0",
11334
+      "resolved": "https://registry.npmjs.org/warn-once/-/warn-once-0.1.0.tgz",
11335
+      "integrity": "sha512-recZTSvuaH/On5ZU5ywq66y99lImWqzP93+AiUo9LUwG8gXHW+LJjhOd6REJHm7qb0niYqrEQJvbHSQfuJtTqA=="
11336
+    },
11053 11337
     "node_modules/wcwidth": {
11054 11338
       "version": "1.0.1",
11055 11339
       "resolved": "https://registry.npmjs.org/wcwidth/-/wcwidth-1.0.1.tgz",
@@ -12538,6 +12822,15 @@
12538 12822
         "minimist": "^1.2.0"
12539 12823
       }
12540 12824
     },
12825
+    "@egjs/hammerjs": {
12826
+      "version": "2.0.17",
12827
+      "resolved": "https://registry.npmjs.org/@egjs/hammerjs/-/hammerjs-2.0.17.tgz",
12828
+      "integrity": "sha512-XQsZgjm2EcVUiZQf11UBJQfmZeEmOW8DpI1gsFeln6w0ae0ii4dMQEQ0kjl6DspdWX1aGY1/loyXnP0JS06e/A==",
12829
+      "peer": true,
12830
+      "requires": {
12831
+        "@types/hammerjs": "^2.0.36"
12832
+      }
12833
+    },
12541 12834
     "@expo/config": {
12542 12835
       "version": "5.0.9",
12543 12836
       "resolved": "https://registry.npmjs.org/@expo/config/-/config-5.0.9.tgz",
@@ -13725,6 +14018,78 @@
13725 14018
       "resolved": "https://registry.npmjs.org/@react-native-community/cli-types/-/cli-types-4.10.1.tgz",
13726 14019
       "integrity": "sha512-ael2f1onoPF3vF7YqHGWy7NnafzGu+yp88BbFbP0ydoCP2xGSUzmZVw0zakPTC040Id+JQ9WeFczujMkDy6jYQ=="
13727 14020
     },
14021
+    "@react-native-picker/picker": {
14022
+      "version": "2.1.0",
14023
+      "resolved": "https://registry.npmjs.org/@react-native-picker/picker/-/picker-2.1.0.tgz",
14024
+      "integrity": "sha512-iJ/QaDrBMBaW6cFuQyR3DXzcn2h7c5O7mGgmNLCBQHTTtLNBZR+Sxogy6YleFPeToNdysG5mTTkXqBmlWHMQqg==",
14025
+      "requires": {}
14026
+    },
14027
+    "@react-navigation/native": {
14028
+      "version": "6.0.4",
14029
+      "resolved": "https://registry.npmjs.org/@react-navigation/native/-/native-6.0.4.tgz",
14030
+      "integrity": "sha512-497dGGDIZ8hDCPGj6GXZvLGHk6NvZk5k4r1cjwgqcXwutK5fS7sgD0dZP52NTQC3GvLe8PZNv6AEdMIqFrZK6A==",
14031
+      "requires": {
14032
+        "@react-navigation/core": "^6.0.2",
14033
+        "escape-string-regexp": "^4.0.0",
14034
+        "nanoid": "^3.1.23"
14035
+      },
14036
+      "dependencies": {
14037
+        "@react-navigation/core": {
14038
+          "version": "6.0.2",
14039
+          "resolved": "https://registry.npmjs.org/@react-navigation/core/-/core-6.0.2.tgz",
14040
+          "integrity": "sha512-Omsb670qmNfO0KGiRrOE+KXpCYQ6jXxE5uCPnj5srW31s6YDGiFl/M5sRcMyBdDXLXp5HjkQTJpU9ilmjKtL5g==",
14041
+          "requires": {
14042
+            "@react-navigation/routers": "^6.0.1",
14043
+            "escape-string-regexp": "^4.0.0",
14044
+            "nanoid": "^3.1.23",
14045
+            "query-string": "^7.0.0",
14046
+            "react-is": "^16.13.0"
14047
+          }
14048
+        },
14049
+        "escape-string-regexp": {
14050
+          "version": "4.0.0",
14051
+          "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz",
14052
+          "integrity": "sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA=="
14053
+        },
14054
+        "react-is": {
14055
+          "version": "16.13.1",
14056
+          "resolved": "https://registry.npmjs.org/react-is/-/react-is-16.13.1.tgz",
14057
+          "integrity": "sha512-24e6ynE2H+OKt4kqsOvNd8kBpV65zoxbA4BVsEOB3ARVWQki/DHzaUoC5KuON/BiccDaCCTZBuOcfZs70kR8bQ=="
14058
+        }
14059
+      }
14060
+    },
14061
+    "@react-navigation/routers": {
14062
+      "version": "6.0.1",
14063
+      "resolved": "https://registry.npmjs.org/@react-navigation/routers/-/routers-6.0.1.tgz",
14064
+      "integrity": "sha512-5ctB49rmtTRQuTSBVgqMsEzBUjPP2ByUzBjNivA7jmvk+PDCl4oZsiR8KAm/twhxe215GYThfi2vUWXKAg6EEQ==",
14065
+      "requires": {
14066
+        "nanoid": "^3.1.23"
14067
+      }
14068
+    },
14069
+    "@react-navigation/stack": {
14070
+      "version": "6.0.9",
14071
+      "resolved": "https://registry.npmjs.org/@react-navigation/stack/-/stack-6.0.9.tgz",
14072
+      "integrity": "sha512-LV9MlxqOH6+wgU7LxhaTRSY+WTuzNa2NnOCji9nyAA4Xohp9tpuLhYJRYdNRWXBcfseBqz1o4L0LAxRMv+CXYQ==",
14073
+      "requires": {
14074
+        "@react-navigation/elements": "^1.1.2",
14075
+        "color": "^3.1.3",
14076
+        "warn-once": "^0.1.0"
14077
+      },
14078
+      "dependencies": {
14079
+        "@react-navigation/elements": {
14080
+          "version": "1.1.2",
14081
+          "resolved": "https://registry.npmjs.org/@react-navigation/elements/-/elements-1.1.2.tgz",
14082
+          "integrity": "sha512-PbPCleC1HpUlXtuP0DFNCNTEhRLd6lmB0KxY0SGRGqCemS3HpG/PajEQ1LDe7S51M03a1tDby1MfKTkNanUXAg==",
14083
+          "requires": {}
14084
+        }
14085
+      }
14086
+    },
14087
+    "@types/hammerjs": {
14088
+      "version": "2.0.40",
14089
+      "resolved": "https://registry.npmjs.org/@types/hammerjs/-/hammerjs-2.0.40.tgz",
14090
+      "integrity": "sha512-VbjwR1fhsn2h2KXAY4oy1fm7dCxaKy0D+deTb8Ilc3Eo3rc5+5eA4rfYmZaHgNJKxVyI0f6WIXzO2zLkVmQPHA==",
14091
+      "peer": true
14092
+    },
13728 14093
     "@types/istanbul-lib-coverage": {
13729 14094
       "version": "2.0.3",
13730 14095
       "resolved": "https://registry.npmjs.org/@types/istanbul-lib-coverage/-/istanbul-lib-coverage-2.0.3.tgz",
@@ -14582,6 +14947,15 @@
14582 14947
         "object-visit": "^1.0.0"
14583 14948
       }
14584 14949
     },
14950
+    "color": {
14951
+      "version": "3.2.1",
14952
+      "resolved": "https://registry.npmjs.org/color/-/color-3.2.1.tgz",
14953
+      "integrity": "sha512-aBl7dZI9ENN6fUGC7mWpMTPNHmWUSNan9tuWN6ahh5ZLNk9baLJOnSMlrQkHcrfFgz2/RigjUVAjdx36VcemKA==",
14954
+      "requires": {
14955
+        "color-convert": "^1.9.3",
14956
+        "color-string": "^1.6.0"
14957
+      }
14958
+    },
14585 14959
     "color-convert": {
14586 14960
       "version": "1.9.3",
14587 14961
       "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz",
@@ -14595,6 +14969,15 @@
14595 14969
       "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz",
14596 14970
       "integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU="
14597 14971
     },
14972
+    "color-string": {
14973
+      "version": "1.6.0",
14974
+      "resolved": "https://registry.npmjs.org/color-string/-/color-string-1.6.0.tgz",
14975
+      "integrity": "sha512-c/hGS+kRWJutUBEngKKmk4iH3sD59MBkoxVapS/0wgpCz2u7XsNloxknyvBhzwEs1IbV36D9PwqLPJ2DTu3vMA==",
14976
+      "requires": {
14977
+        "color-name": "^1.0.0",
14978
+        "simple-swizzle": "^0.2.2"
14979
+      }
14980
+    },
14598 14981
     "color-support": {
14599 14982
       "version": "1.1.3",
14600 14983
       "resolved": "https://registry.npmjs.org/color-support/-/color-support-1.1.3.tgz",
@@ -14768,6 +15151,23 @@
14768 15151
         "object-assign": "^4.1.1"
14769 15152
       }
14770 15153
     },
15154
+    "cross-fetch": {
15155
+      "version": "3.1.4",
15156
+      "resolved": "https://registry.npmjs.org/cross-fetch/-/cross-fetch-3.1.4.tgz",
15157
+      "integrity": "sha512-1eAtFWdIubi6T4XPy6ei9iUFoKpUkIF971QLN8lIvvvwueI65+Nw5haMNKUwfJxabqlIIDODJKGrQ66gxC0PbQ==",
15158
+      "peer": true,
15159
+      "requires": {
15160
+        "node-fetch": "2.6.1"
15161
+      },
15162
+      "dependencies": {
15163
+        "node-fetch": {
15164
+          "version": "2.6.1",
15165
+          "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.6.1.tgz",
15166
+          "integrity": "sha512-V4aYg89jEoVRxRb2fJdAg8FHvI7cEyYdVAh94HH0UIK8oJxUfkjlDQN9RbMx+bEjP7+ggMiFRprSti032Oipxw==",
15167
+          "peer": true
15168
+        }
15169
+      }
15170
+    },
14771 15171
     "cross-spawn": {
14772 15172
       "version": "6.0.5",
14773 15173
       "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-6.0.5.tgz",
@@ -15710,6 +16110,11 @@
15710 16110
         "to-regex-range": "^5.0.1"
15711 16111
       }
15712 16112
     },
16113
+    "filter-obj": {
16114
+      "version": "1.1.0",
16115
+      "resolved": "https://registry.npmjs.org/filter-obj/-/filter-obj-1.1.0.tgz",
16116
+      "integrity": "sha1-mzERErxsYSehbgFsbF1/GeCAXFs="
16117
+    },
15713 16118
     "finalhandler": {
15714 16119
       "version": "1.1.2",
15715 16120
       "resolved": "https://registry.npmjs.org/finalhandler/-/finalhandler-1.1.2.tgz",
@@ -16010,6 +16415,23 @@
16010 16415
         }
16011 16416
       }
16012 16417
     },
16418
+    "hoist-non-react-statics": {
16419
+      "version": "3.3.2",
16420
+      "resolved": "https://registry.npmjs.org/hoist-non-react-statics/-/hoist-non-react-statics-3.3.2.tgz",
16421
+      "integrity": "sha512-/gGivxi8JPKWNm/W0jSmzcMPpfpPLc3dY/6GxhX2hQ9iGj3aDfklV4ET7NjKpSinLpJ5vafa9iiGIEZg10SfBw==",
16422
+      "peer": true,
16423
+      "requires": {
16424
+        "react-is": "^16.7.0"
16425
+      },
16426
+      "dependencies": {
16427
+        "react-is": {
16428
+          "version": "16.13.1",
16429
+          "resolved": "https://registry.npmjs.org/react-is/-/react-is-16.13.1.tgz",
16430
+          "integrity": "sha512-24e6ynE2H+OKt4kqsOvNd8kBpV65zoxbA4BVsEOB3ARVWQki/DHzaUoC5KuON/BiccDaCCTZBuOcfZs70kR8bQ==",
16431
+          "peer": true
16432
+        }
16433
+      }
16434
+    },
16013 16435
     "http-errors": {
16014 16436
       "version": "1.7.3",
16015 16437
       "resolved": "https://registry.npmjs.org/http-errors/-/http-errors-1.7.3.tgz",
@@ -17775,6 +18197,11 @@
17775 18197
       "resolved": "https://registry.npmjs.org/nanocolors/-/nanocolors-0.1.12.tgz",
17776 18198
       "integrity": "sha512-2nMHqg1x5PU+unxX7PGY7AuYxl2qDx7PSrTRjizr8sxdd3l/3hBuWWaki62qmtYm2U5i4Z5E7GbjlyDFhs9/EQ=="
17777 18199
     },
18200
+    "nanoid": {
18201
+      "version": "3.1.28",
18202
+      "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.1.28.tgz",
18203
+      "integrity": "sha512-gSu9VZ2HtmoKYe/lmyPFES5nknFrHa+/DT9muUFWFMi6Jh9E1I7bkvlQ8xxf1Kos9pi9o8lBnIOkatMhKX/YUw=="
18204
+    },
17778 18205
     "nanomatch": {
17779 18206
       "version": "1.2.13",
17780 18207
       "resolved": "https://registry.npmjs.org/nanomatch/-/nanomatch-1.2.13.tgz",
@@ -18362,6 +18789,17 @@
18362 18789
         "once": "^1.3.1"
18363 18790
       }
18364 18791
     },
18792
+    "query-string": {
18793
+      "version": "7.0.1",
18794
+      "resolved": "https://registry.npmjs.org/query-string/-/query-string-7.0.1.tgz",
18795
+      "integrity": "sha512-uIw3iRvHnk9to1blJCG3BTc+Ro56CBowJXKmNNAm3RulvPBzWLRqKSiiDk+IplJhsydwtuNMHi8UGQFcCLVfkA==",
18796
+      "requires": {
18797
+        "decode-uri-component": "^0.2.0",
18798
+        "filter-obj": "^1.1.0",
18799
+        "split-on-first": "^1.0.0",
18800
+        "strict-uri-encode": "^2.0.0"
18801
+      }
18802
+    },
18365 18803
     "querystringify": {
18366 18804
       "version": "2.2.0",
18367 18805
       "resolved": "https://registry.npmjs.org/querystringify/-/querystringify-2.2.0.tgz",
@@ -18728,6 +19166,52 @@
18728 19166
         }
18729 19167
       }
18730 19168
     },
19169
+    "react-native-gesture-handler": {
19170
+      "version": "1.10.3",
19171
+      "resolved": "https://registry.npmjs.org/react-native-gesture-handler/-/react-native-gesture-handler-1.10.3.tgz",
19172
+      "integrity": "sha512-cBGMi1IEsIVMgoox4RvMx7V2r6bNKw0uR1Mu1o7NbuHS6BRSVLq0dP34l2ecnPlC+jpWd3le6Yg1nrdCjby2Mw==",
19173
+      "peer": true,
19174
+      "requires": {
19175
+        "@egjs/hammerjs": "^2.0.17",
19176
+        "fbjs": "^3.0.0",
19177
+        "hoist-non-react-statics": "^3.3.0",
19178
+        "invariant": "^2.2.4",
19179
+        "prop-types": "^15.7.2"
19180
+      },
19181
+      "dependencies": {
19182
+        "fbjs": {
19183
+          "version": "3.0.0",
19184
+          "resolved": "https://registry.npmjs.org/fbjs/-/fbjs-3.0.0.tgz",
19185
+          "integrity": "sha512-dJd4PiDOFuhe7vk4F80Mba83Vr2QuK86FoxtgPmzBqEJahncp+13YCmfoa53KHCo6OnlXLG7eeMWPfB5CrpVKg==",
19186
+          "peer": true,
19187
+          "requires": {
19188
+            "cross-fetch": "^3.0.4",
19189
+            "fbjs-css-vars": "^1.0.0",
19190
+            "loose-envify": "^1.0.0",
19191
+            "object-assign": "^4.1.0",
19192
+            "promise": "^7.1.1",
19193
+            "setimmediate": "^1.0.5",
19194
+            "ua-parser-js": "^0.7.18"
19195
+          }
19196
+        }
19197
+      }
19198
+    },
19199
+    "react-native-safe-area-context": {
19200
+      "version": "3.3.2",
19201
+      "resolved": "https://registry.npmjs.org/react-native-safe-area-context/-/react-native-safe-area-context-3.3.2.tgz",
19202
+      "integrity": "sha512-yOwiiPJ1rk+/nfK13eafbpW6sKW0jOnsRem2C1LPJjM3tfTof6hlvV5eWHATye3XOpu2cJ7N+HdkUvUDGwFD2Q==",
19203
+      "peer": true,
19204
+      "requires": {}
19205
+    },
19206
+    "react-native-screens": {
19207
+      "version": "3.8.0",
19208
+      "resolved": "https://registry.npmjs.org/react-native-screens/-/react-native-screens-3.8.0.tgz",
19209
+      "integrity": "sha512-lHrnB/elAoMJKv8O12U6BLgeup4lB6ZKJHEOVuG/D72nv/OE9wUusbou6YCB5tp3YbaSpHflPnkFmHA/vCejpw==",
19210
+      "peer": true,
19211
+      "requires": {
19212
+        "warn-once": "^0.1.0"
19213
+      }
19214
+    },
18731 19215
     "react-native-web": {
18732 19216
       "version": "0.13.18",
18733 19217
       "resolved": "https://registry.npmjs.org/react-native-web/-/react-native-web-0.13.18.tgz",
@@ -19311,6 +19795,21 @@
19311 19795
         "plist": "^3.0.1"
19312 19796
       }
19313 19797
     },
19798
+    "simple-swizzle": {
19799
+      "version": "0.2.2",
19800
+      "resolved": "https://registry.npmjs.org/simple-swizzle/-/simple-swizzle-0.2.2.tgz",
19801
+      "integrity": "sha1-pNprY1/8zMoz9w0Xy5JZLeleVXo=",
19802
+      "requires": {
19803
+        "is-arrayish": "^0.3.1"
19804
+      },
19805
+      "dependencies": {
19806
+        "is-arrayish": {
19807
+          "version": "0.3.2",
19808
+          "resolved": "https://registry.npmjs.org/is-arrayish/-/is-arrayish-0.3.2.tgz",
19809
+          "integrity": "sha512-eVRqCvVlZbuw3GrM63ovNSNAeA1K16kaR/LRY/92w0zxQ5/1YzwblUX652i4Xs9RwAGjW9d9y6X88t8OaAJfWQ=="
19810
+        }
19811
+      }
19812
+    },
19314 19813
     "slash": {
19315 19814
       "version": "3.0.0",
19316 19815
       "resolved": "https://registry.npmjs.org/slash/-/slash-3.0.0.tgz",
@@ -19509,6 +20008,11 @@
19509 20008
       "resolved": "https://registry.npmjs.org/source-map-url/-/source-map-url-0.4.1.tgz",
19510 20009
       "integrity": "sha512-cPiFOTLUKvJFIg4SKVScy4ilPPW6rFgMgfuZJPNoDuMs3nC1HbMUycBoJw77xFIp6z1UJQJOfx6C9GMH80DiTw=="
19511 20010
     },
20011
+    "split-on-first": {
20012
+      "version": "1.1.0",
20013
+      "resolved": "https://registry.npmjs.org/split-on-first/-/split-on-first-1.1.0.tgz",
20014
+      "integrity": "sha512-43ZssAJaMusuKWL8sKUBQXHWOpq8d6CfN/u1p4gUzfJkM05C8rxTmYrkIPTXapZpORA6LkkzcUulJ8FqA7Uudw=="
20015
+    },
19512 20016
     "split-string": {
19513 20017
       "version": "3.1.0",
19514 20018
       "resolved": "https://registry.npmjs.org/split-string/-/split-string-3.1.0.tgz",
@@ -19641,6 +20145,11 @@
19641 20145
       "resolved": "https://registry.npmjs.org/stream-buffers/-/stream-buffers-2.2.0.tgz",
19642 20146
       "integrity": "sha1-kdX1Ew0c75bc+n9yaUUYh0HQnuQ="
19643 20147
     },
20148
+    "strict-uri-encode": {
20149
+      "version": "2.0.0",
20150
+      "resolved": "https://registry.npmjs.org/strict-uri-encode/-/strict-uri-encode-2.0.0.tgz",
20151
+      "integrity": "sha1-ucczDHBChi9rFC3CdLvMWGbONUY="
20152
+    },
19644 20153
     "string_decoder": {
19645 20154
       "version": "1.1.1",
19646 20155
       "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz",
@@ -20063,6 +20572,11 @@
20063 20572
         "makeerror": "1.0.x"
20064 20573
       }
20065 20574
     },
20575
+    "warn-once": {
20576
+      "version": "0.1.0",
20577
+      "resolved": "https://registry.npmjs.org/warn-once/-/warn-once-0.1.0.tgz",
20578
+      "integrity": "sha512-recZTSvuaH/On5ZU5ywq66y99lImWqzP93+AiUo9LUwG8gXHW+LJjhOd6REJHm7qb0niYqrEQJvbHSQfuJtTqA=="
20579
+    },
20066 20580
     "wcwidth": {
20067 20581
       "version": "1.0.1",
20068 20582
       "resolved": "https://registry.npmjs.org/wcwidth/-/wcwidth-1.0.1.tgz",

+ 3
- 0
package.json Näytä tiedosto

@@ -8,6 +8,9 @@
8 8
     "eject": "expo eject"
9 9
   },
10 10
   "dependencies": {
11
+    "@react-native-picker/picker": "^2.1.0",
12
+    "@react-navigation/native": "^6.0.4",
13
+    "@react-navigation/stack": "^6.0.9",
11 14
     "expo": "~42.0.1",
12 15
     "expo-status-bar": "~1.0.4",
13 16
     "firebase": "8.2.3",

+ 92
- 0
screens/Home_page.js Näytä tiedosto

@@ -0,0 +1,92 @@
1
+import React, {useState, useEffect} from 'react'
2
+import { Button, Text, View, StyleSheet} from 'react-native'
3
+import {FlatList, ListViewBase } from 'react-native'
4
+import {TouchableOpacity} from 'react-native-gesture-handler'
5
+import {List, Divider} from 'react-native-paper'
6
+import Loading from '../components/Loading'
7
+import firebase from 'firebase';
8
+
9
+
10
+export default function Home_page({navigation}) {
11
+  const [threads, setThreads] = useState([]);  
12
+  const [loading, setLoading] = useState(true);
13
+
14
+  useEffect(() => {
15
+
16
+    const fire = firebase.firestore()
17
+    .collection('THREADS')
18
+    
19
+    .onSnapshot(querySnapshot => {
20
+      const threads = querySnapshot.docs.map(documentSnapshot => {
21
+        return{
22
+          _id:documentSnapshot.id,
23
+          name:'',
24
+          ...documentSnapshot.data()
25
+        };
26
+
27
+      });
28
+
29
+      setThreads(threads);
30
+
31
+      if(loading){
32
+        setLoading(false);
33
+      }
34
+
35
+    });
36
+
37
+    return () => fire();
38
+  }, []);
39
+  
40
+  if (loading) {
41
+    return <Loading />;
42
+  }
43
+  
44
+  return (
45
+      <View style={styles.container}>
46
+        <FlatList
47
+          data={threads}
48
+          keyExtractor = {item => item._id}
49
+          ItemSeparatorComponent={() => <Divider />}
50
+          renderItem = {({item}) => (
51
+
52
+            <TouchableOpacity
53
+            onPress={() => navigation.navigate('Room', {thread: item})}
54
+            
55
+            >
56
+            <List.Item
57
+              title={item.name}
58
+              description='Item description'
59
+              titleNumberOfLines={1}
60
+              titleStyle={styles.listTitle}
61
+              descriptionStyle={styles.listDescription}
62
+              descriptionNumberOfLines={1}
63
+            />
64
+          </TouchableOpacity>
65
+        )}
66
+      />
67
+
68
+      <Button
69
+        title='Add Room'
70
+        onPress={() => navigation.navigate('Add')}
71
+      />
72
+
73
+        <Button
74
+        title ='Room'
75
+        onPress= {() => navigation.navigate('Room')}
76
+        />
77
+
78
+      </View>
79
+    );
80
+  }
81
+  const styles = StyleSheet.create({
82
+    container: {
83
+      backgroundColor: '#f5f5f5',
84
+      flex: 1
85
+    },
86
+    listTitle: {
87
+      fontSize: 22
88
+    },
89
+    listDescription: {
90
+      fontSize: 16
91
+    }
92
+  });

+ 38
- 0
screens/LoginScreen.js Näytä tiedosto

@@ -0,0 +1,38 @@
1
+import React, { Component } from "react";
2
+import { TextInput, TouchableWithoutFeedback, Keyboard, ImageBackground, Image } from "react-native";
3
+import firebase from "firebase";
4
+
5
+import { styles } from "../config/styles";
6
+import CustomButton from "../components/CustomButton";
7
+
8
+
9
+export default class LoginScreen extends Component {
10
+    constructor(props) {
11
+        super(props);
12
+        this.state = {
13
+            email: '',
14
+            password: '',
15
+        };
16
+        this.onLogin = this.onLogin.bind(this)
17
+    };
18
+
19
+    onLogin() {
20
+        const { email, password } = this.state;
21
+        firebase.auth().signInWithEmailAndPassword(email, password).then((result) => {console.log(result)}).catch((error) => {console.log(error)})
22
+    }
23
+
24
+    render() {
25
+        
26
+        return (
27
+            <TouchableWithoutFeedback style={styles.stdcontainer} onPress={Keyboard.dismiss} accessible={false}>
28
+                <ImageBackground style={styles.stdcontainer} source={require('../assets/yellow-white.jpg')}>
29
+                    <Image style={styles.logo} resizeMode="contain" source={require("../assets/open-hand.png")}/>
30
+                    <TextInput style={styles.regtxtfield} placeholder="Email" onChangeText={(email) => this.setState({ email })}/>
31
+                    <TextInput style={styles.regtxtfield} placeholder="Password" onChangeText={(password) => this.setState({ password })} secureTextEntry={ true }/>
32
+                    <CustomButton marginTop={70} title="Login" onPress={() => this.onLogin()}/>
33
+                    <CustomButton marginTop={25} title="Register" onPress={() => this.props.navigation.navigate('Register')}/>
34
+                </ImageBackground>
35
+            </TouchableWithoutFeedback>
36
+        );
37
+    }
38
+}

+ 56
- 0
screens/RegisterScreen.js Näytä tiedosto

@@ -0,0 +1,56 @@
1
+import React, { Component } from "react";
2
+import { TextInput, TouchableWithoutFeedback, Keyboard, ImageBackground, Text, View } from "react-native";
3
+import firebase from "firebase";
4
+import { Picker } from "@react-native-picker/picker";
5
+
6
+import { styles } from "../config/styles";
7
+import CustomButton from "../components/CustomButton";
8
+
9
+export default class RegisterScreen extends Component {
10
+    constructor(props) {
11
+        super(props);
12
+        this.state = {
13
+            username: '',
14
+            email: '',
15
+            password: '',
16
+            interpreter: false,
17
+        };
18
+        this.onRegister = this.onRegister.bind(this)
19
+    };
20
+
21
+    onRegister() {
22
+        const { username, email, password, interpreter } = this.state;
23
+        firebase.auth().createUserWithEmailAndPassword(email, password)
24
+            .then((result) => {
25
+                firebase.firestore().collection("Users")
26
+                    .doc(firebase.auth().currentUser.uid)
27
+                    .set({
28
+                        username,
29
+                        email,
30
+                        interpreter,
31
+                    })
32
+                console.log(result)
33
+            })
34
+            .catch((error) => {
35
+                console.log(error)
36
+            })
37
+    }
38
+
39
+    render() {
40
+        return (
41
+            <TouchableWithoutFeedback style={styles.regcontainer} onPress={Keyboard.dismiss} accessible={false}>
42
+                <ImageBackground style={styles.regcontainer} source={require('../assets/yellow-white.jpg')}>
43
+                    <TextInput style={styles.regtxtfield} placeholder="Userame" onChangeText={(username) => this.setState({ username })}/>
44
+                    <TextInput style={styles.regtxtfield} placeholder="Email" onChangeText={(email) => this.setState({ email })}/>
45
+                    <TextInput style={styles.regtxtfield} placeholder="Password" onChangeText={(password) => this.setState({ password })} secureTextEntry={ true }/>
46
+                    <Text style={styles.qsttxt}>Are you an interpreter?</Text>
47
+                    <Picker style={styles.picker} selectedValue={this.state.interpreter} onValueChange={(itemValue,itemIndex) => this.setState({interpreter: itemValue})}>
48
+                        <Picker.Item label="Yes" value={true}/>
49
+                        <Picker.Item label="No" value={false}/>
50
+                    </Picker>
51
+                    <CustomButton  marginTop={50} title="Register" onPress={() => this.onRegister()}/>
52
+                </ImageBackground>
53
+            </TouchableWithoutFeedback>
54
+        );
55
+    }
56
+}