From abec08ab2c5a7ad0a91943315c780389c58d6fc3 Mon Sep 17 00:00:00 2001 From: akshayd2020 Date: Fri, 13 Oct 2023 16:57:38 -0400 Subject: [PATCH 01/22] Temp commit --- client-new/App.tsx | 8 ++- client-new/app.json | 3 +- client-new/package.json | 1 + client-new/src/screens/auth/AccessScreen.tsx | 14 +++++ client-new/yarn.lock | 60 +++++++++++++++++++- 5 files changed, 83 insertions(+), 3 deletions(-) diff --git a/client-new/App.tsx b/client-new/App.tsx index d57564d..cc2f139 100644 --- a/client-new/App.tsx +++ b/client-new/App.tsx @@ -3,6 +3,7 @@ import { StyleSheet, Text, View } from "react-native"; import Router from "./src/navigation/Router"; import { NativeBaseProvider, extendTheme } from "native-base"; import { SafeAreaProvider } from "react-native-safe-area-context"; +import { Auth0Provider } from "react-native-auth0"; export default function App() { const theme = extendTheme({ @@ -10,11 +11,16 @@ export default function App() { colors: {}, }); return ( - + + + + ); } diff --git a/client-new/app.json b/client-new/app.json index 06acf38..dce30e5 100644 --- a/client-new/app.json +++ b/client-new/app.json @@ -22,7 +22,8 @@ "adaptiveIcon": { "foregroundImage": "./assets/adaptive-icon.png", "backgroundColor": "#ffffff" - } + }, + "package": "com.legacy" }, "web": { "favicon": "./assets/favicon.png" diff --git a/client-new/package.json b/client-new/package.json index 05abe49..f3f5f72 100644 --- a/client-new/package.json +++ b/client-new/package.json @@ -22,6 +22,7 @@ "react": "18.2.0", "react-dom": "^18.2.0", "react-native": "0.72.5", + "react-native-auth0": "^3.0.2", "react-native-responsive-screen": "^1.4.2", "react-native-safe-area-context": "^4.7.2", "react-native-screens": "^3.25.0", diff --git a/client-new/src/screens/auth/AccessScreen.tsx b/client-new/src/screens/auth/AccessScreen.tsx index 7ecae0c..3bca876 100644 --- a/client-new/src/screens/auth/AccessScreen.tsx +++ b/client-new/src/screens/auth/AccessScreen.tsx @@ -1,10 +1,24 @@ +import { Button } from "native-base"; import { Text } from "react-native"; import { SafeAreaView } from "react-native-safe-area-context"; +import { useAuth0 } from "react-native-auth0"; +import { Alert } from "react-native"; export default function AccessScreen() { + const { authorize } = useAuth0(); + + const onPress = async () => { + try { + await authorize(); + Alert.alert("Success", "You have successfully logged in"); + } catch (e) { + console.log(e); + } + }; return ( Access Screen, Welcome to Legacy! This is Akshay + ); } diff --git a/client-new/yarn.lock b/client-new/yarn.lock index 6e895c1..9d859e3 100644 --- a/client-new/yarn.lock +++ b/client-new/yarn.lock @@ -3218,6 +3218,11 @@ balanced-match@^1.0.0: resolved "https://registry.yarnpkg.com/balanced-match/-/balanced-match-1.0.2.tgz#e83e3a7e3f300b34cb9d87f615fa0cbf357690ee" integrity sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw== +base-64@^0.1.0: + version "0.1.0" + resolved "https://registry.yarnpkg.com/base-64/-/base-64-0.1.0.tgz#780a99c84e7d600260361511c4877613bf24f6bb" + integrity sha512-Y5gU45svrR5tI2Vt/X9GPd3L0HNIKzGu202EjxrXMpuc2V2CiKgemAbUUsqYmZJvPtCXoUKjNZwBJzsNScUbXA== + base64-js@^1.1.2, base64-js@^1.2.3, base64-js@^1.3.1, base64-js@^1.5.1: version "1.5.1" resolved "https://registry.yarnpkg.com/base64-js/-/base64-js-1.5.1.tgz#1b1b440160a5bf7ad40b650f095963481903930a" @@ -3727,6 +3732,11 @@ crypt@0.0.2, crypt@~0.0.1: resolved "https://registry.yarnpkg.com/crypt/-/crypt-0.0.2.tgz#88d7ff7ec0dfb86f713dc87bbb42d044d3e6c41b" integrity sha512-mCxBlsHFYh9C+HVpiEacem8FEBnMXgU9gy4zmNC+SXAZNB/1idgp/aulFJ4FgCi7GPEVbfyng092GqL2k2rmow== +crypto-js@^4.0.0: + version "4.1.1" + resolved "https://registry.yarnpkg.com/crypto-js/-/crypto-js-4.1.1.tgz#9e485bcf03521041bd85844786b83fb7619736cf" + integrity sha512-o2JlM7ydqd3Qk9CA0L4NL6mTzU2sdx96a+oOfPu8Mkl/PK51vSyoi8/rQ8NknZtk44vq15lmhAj9CIAGwgeWKw== + crypto-random-string@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/crypto-random-string/-/crypto-random-string-1.0.0.tgz#a230f64f568310e1498009940790ec99545bca7e" @@ -5072,6 +5082,11 @@ js-yaml@^4.1.0: dependencies: argparse "^2.0.1" +jsbn@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/jsbn/-/jsbn-1.1.0.tgz#b01307cb29b618a1ed26ec79e911f803c4da0040" + integrity sha512-4bYVV3aAMtDTTu4+xsDYa6sy9GyJ69/amsu9sYF2zqjiEoZA5xJi3BrfX3uY+/IekIu7MwdObdbDWpoZdBv3/A== + jsc-android@^250231.0.0: version "250231.0.0" resolved "https://registry.yarnpkg.com/jsc-android/-/jsc-android-250231.0.0.tgz#91720f8df382a108872fa4b3f558f33ba5e95262" @@ -5157,6 +5172,11 @@ jsonfile@^6.0.1: optionalDependencies: graceful-fs "^4.1.6" +jwt-decode@^3.1.2: + version "3.1.2" + resolved "https://registry.yarnpkg.com/jwt-decode/-/jwt-decode-3.1.2.tgz#3fb319f3675a2df0c2895c8f5e9fa4b67b04ed59" + integrity sha512-UfpWE/VZn0iP50d8cz9NrZLM9lSWhcJ+0Gt/nm4by88UL+J1SiKN8/5dkjMmbEzwL2CAe+67GsegCbIKtbp75A== + kind-of@^6.0.2: version "6.0.3" resolved "https://registry.yarnpkg.com/kind-of/-/kind-of-6.0.3.tgz#07c05034a6c349fa06e24fa35aa76db4580ce4dd" @@ -6324,6 +6344,11 @@ postcss@~8.4.21: picocolors "^1.0.0" source-map-js "^1.0.2" +prettier-quick@^0.0.5: + version "0.0.5" + resolved "https://registry.yarnpkg.com/prettier-quick/-/prettier-quick-0.0.5.tgz#10912263ede6e99872f4d3655b6a8a205265d4ce" + integrity sha512-5zOMSPAK7JQMNWjtxAy35XPgRN8TQY+khgpNhznQ30Zsv6V0hOIjre8X5cTrtdqa3NKZWWF1+TNS5+1LX/3a0w== + pretty-bytes@5.6.0: version "5.6.0" resolved "https://registry.yarnpkg.com/pretty-bytes/-/pretty-bytes-5.6.0.tgz#356256f643804773c82f64723fe78c92c62beaeb" @@ -6385,7 +6410,7 @@ prompts@^2.3.2, prompts@^2.4.0: kleur "^3.0.3" sisteransi "^1.0.5" -prop-types@*: +prop-types@*, prop-types@^15.8.1: version "15.8.1" resolved "https://registry.yarnpkg.com/prop-types/-/prop-types-15.8.1.tgz#67d87bf1a694f48435cf332c24af10214a3140b5" integrity sha512-oj87CgZICdulUohogVAR7AjlC0327U4el4L6eAvOqCeudMDVU0NThNaV+b9Df4dXgSP1gXMTnPdhfe/2qDH5cg== @@ -6402,6 +6427,11 @@ pump@^3.0.0: end-of-stream "^1.1.0" once "^1.3.1" +punycode@^1.4.1: + version "1.4.1" + resolved "https://registry.yarnpkg.com/punycode/-/punycode-1.4.1.tgz#c0d5a63b2718800ad8e1eb0fa5269c84dd41845e" + integrity sha512-jmYNElW7yvO7TV33CjSmvSiE2yco3bV2czu/OzDKdMNVZQWfxCblURLhf+47syQRBntjfLdd/H0egrzIG+oaFQ== + qrcode-terminal@0.11.0: version "0.11.0" resolved "https://registry.yarnpkg.com/qrcode-terminal/-/qrcode-terminal-0.11.0.tgz#ffc6c28a2fc0bfb47052b47e23f4f446a5fbdb9e" @@ -6414,6 +6444,13 @@ qs@6.11.0: dependencies: side-channel "^1.0.4" +qs@^6.11.2: + version "6.11.2" + resolved "https://registry.yarnpkg.com/qs/-/qs-6.11.2.tgz#64bea51f12c1f5da1bc01496f48ffcff7c69d7d9" + integrity sha512-tDNIz22aBzCDxLtVH++VnTfzxlfeK5CbqohpSqpJgj1Wg/cQbStNAz3NuqCs5vV+pjBsK4x4pN9HlVh7rcYRiA== + dependencies: + side-channel "^1.0.4" + query-string@^7.1.3: version "7.1.3" resolved "https://registry.yarnpkg.com/query-string/-/query-string-7.1.3.tgz#a1cf90e994abb113a325804a972d98276fe02328" @@ -6502,6 +6539,19 @@ react-is@^17.0.1: resolved "https://registry.yarnpkg.com/react-is/-/react-is-17.0.2.tgz#e691d4a8e9c789365655539ab372762b0efb54f0" integrity sha512-w2GsyukL62IJnlaff/nRegPQR94C/XXamvMWmSHRJ4y7Ts/4ocGRmTHvOs8PSE6pB3dWOrD/nueuU5sduBsQ4w== +react-native-auth0@^3.0.2: + version "3.0.2" + resolved "https://registry.yarnpkg.com/react-native-auth0/-/react-native-auth0-3.0.2.tgz#e7fb5995f67114e4f685648af8f2d1242f4ef558" + integrity sha512-lHrUH/bFivYUXjK/HprKFca8gllTjCkOe00jIPo7B1Wh5xEB2OEpFZizD+cJHN6SlSU8ZUIRgBNJVhf1GwsW2A== + dependencies: + base-64 "^0.1.0" + crypto-js "^4.0.0" + jsbn "^1.1.0" + jwt-decode "^3.1.2" + prettier-quick "^0.0.5" + prop-types "^15.8.1" + url "^0.11.0" + react-native-responsive-screen@^1.4.2: version "1.4.2" resolved "https://registry.yarnpkg.com/react-native-responsive-screen/-/react-native-responsive-screen-1.4.2.tgz#45280826d24f9accbfdf46a36cb8e6d780f76f28" @@ -7534,6 +7584,14 @@ url-parse@^1.5.9: querystringify "^2.1.1" requires-port "^1.0.0" +url@^0.11.0: + version "0.11.3" + resolved "https://registry.yarnpkg.com/url/-/url-0.11.3.tgz#6f495f4b935de40ce4a0a52faee8954244f3d3ad" + integrity sha512-6hxOLGfZASQK/cijlZnZJTq8OXAkt/3YGfQX45vvMYXpZoo8NdWZcY73K108Jf759lS1Bv/8wXnHDTSz17dSRw== + dependencies: + punycode "^1.4.1" + qs "^6.11.2" + use-latest-callback@^0.1.5: version "0.1.6" resolved "https://registry.yarnpkg.com/use-latest-callback/-/use-latest-callback-0.1.6.tgz#3fa6e7babbb5f9bfa24b5094b22939e1e92ebcf6" From 919afb15f52f955c00e51382e7147488a468886a Mon Sep 17 00:00:00 2001 From: akshayd2020 Date: Sun, 15 Oct 2023 17:11:01 -0400 Subject: [PATCH 02/22] Started firebase fix --- client-new/App.tsx | 16 +- client-new/app.json | 2 +- client-new/package.json | 1 + client-new/src/screens/auth/AccessScreen.tsx | 120 +++- client-new/tsconfig.json | 3 +- client-new/yarn.lock | 570 ++++++++++++++++++- 6 files changed, 673 insertions(+), 39 deletions(-) diff --git a/client-new/App.tsx b/client-new/App.tsx index cc2f139..a662925 100644 --- a/client-new/App.tsx +++ b/client-new/App.tsx @@ -4,6 +4,7 @@ import Router from "./src/navigation/Router"; import { NativeBaseProvider, extendTheme } from "native-base"; import { SafeAreaProvider } from "react-native-safe-area-context"; import { Auth0Provider } from "react-native-auth0"; +import { AuthProvider } from "./src/contexts/AuthContext"; export default function App() { const theme = extendTheme({ @@ -11,16 +12,13 @@ export default function App() { colors: {}, }); return ( - + - - - - - - + + + + + ); } diff --git a/client-new/app.json b/client-new/app.json index dce30e5..84bfc6c 100644 --- a/client-new/app.json +++ b/client-new/app.json @@ -16,7 +16,7 @@ ], "ios": { "supportsTablet": true, - "bundleIdentifier": "com.dupuguntla.a.legacy" + "bundleIdentifier": "com.legacy" }, "android": { "adaptiveIcon": { diff --git a/client-new/package.json b/client-new/package.json index f3f5f72..cc281d0 100644 --- a/client-new/package.json +++ b/client-new/package.json @@ -18,6 +18,7 @@ "expo": "~49.0.13", "expo-dev-client": "^2.4.11", "expo-status-bar": "~1.6.0", + "firebase": "^10.5.0", "native-base": "^3.4.28", "react": "18.2.0", "react-dom": "^18.2.0", diff --git a/client-new/src/screens/auth/AccessScreen.tsx b/client-new/src/screens/auth/AccessScreen.tsx index 3bca876..481c258 100644 --- a/client-new/src/screens/auth/AccessScreen.tsx +++ b/client-new/src/screens/auth/AccessScreen.tsx @@ -1,24 +1,114 @@ -import { Button } from "native-base"; -import { Text } from "react-native"; +import { Button, Input, KeyboardAvoidingView, View } from "native-base"; +import { Text, TextInput, TouchableOpacity, StyleSheet } from "react-native"; import { SafeAreaView } from "react-native-safe-area-context"; -import { useAuth0 } from "react-native-auth0"; -import { Alert } from "react-native"; +import { useAuth } from "../../contexts/AuthContext"; +import { useState } from "react"; +import ScreenWideInput from "../../components/reusable/ScreenWideInput"; export default function AccessScreen() { - const { authorize } = useAuth0(); + const { user, createAccount, login, logout } = useAuth(); + + const [email, setEmail] = useState('') + const [password, setPassword] = useState('') + + const signUp = () => { + createAccount(email, password) + } + + const signIn = () => { + login(email, password) + } - const onPress = async () => { - try { - await authorize(); - Alert.alert("Success", "You have successfully logged in"); - } catch (e) { - console.log(e); - } - }; return ( - Access Screen, Welcome to Legacy! This is Akshay - + + + setEmail(text)} + style={styles.input} + /> + setPassword(text)} + style={styles.input} + secureTextEntry + /> + + + + + Login + + + Register + + + Logout + + + + + + ); } + +const styles = StyleSheet.create({ + container: { + flex: 1, + justifyContent: 'center', + alignItems: 'center', + }, + inputContainer: { + width: '80%' + }, + input: { + backgroundColor: 'white', + paddingHorizontal: 15, + paddingVertical: 10, + borderRadius: 10, + marginTop: 5, + }, + buttonContainer: { + width: '60%', + justifyContent: 'center', + alignItems: 'center', + marginTop: 40, + }, + button: { + backgroundColor: '#0782F9', + width: '100%', + padding: 15, + borderRadius: 10, + alignItems: 'center', + }, + buttonOutline: { + backgroundColor: 'white', + marginTop: 5, + borderColor: '#0782F9', + borderWidth: 2, + }, + buttonText: { + color: 'white', + fontWeight: '700', + fontSize: 16, + }, + buttonOutlineText: { + color: '#0782F9', + fontWeight: '700', + fontSize: 16, + }, +}) \ No newline at end of file diff --git a/client-new/tsconfig.json b/client-new/tsconfig.json index 5a05690..b4a4529 100644 --- a/client-new/tsconfig.json +++ b/client-new/tsconfig.json @@ -1,5 +1,4 @@ { "compilerOptions": {}, "extends": "expo/tsconfig.base" -} - +} \ No newline at end of file diff --git a/client-new/yarn.lock b/client-new/yarn.lock index 9d859e3..ef53f2c 100644 --- a/client-new/yarn.lock +++ b/client-new/yarn.lock @@ -1484,6 +1484,378 @@ find-up "^5.0.0" js-yaml "^4.1.0" +"@firebase/analytics-compat@0.2.6": + version "0.2.6" + resolved "https://registry.yarnpkg.com/@firebase/analytics-compat/-/analytics-compat-0.2.6.tgz#50063978c42f13eb800e037e96ac4b17236841f4" + integrity sha512-4MqpVLFkGK7NJf/5wPEEP7ePBJatwYpyjgJ+wQHQGHfzaCDgntOnl9rL2vbVGGKCnRqWtZDIWhctB86UWXaX2Q== + dependencies: + "@firebase/analytics" "0.10.0" + "@firebase/analytics-types" "0.8.0" + "@firebase/component" "0.6.4" + "@firebase/util" "1.9.3" + tslib "^2.1.0" + +"@firebase/analytics-types@0.8.0": + version "0.8.0" + resolved "https://registry.yarnpkg.com/@firebase/analytics-types/-/analytics-types-0.8.0.tgz#551e744a29adbc07f557306530a2ec86add6d410" + integrity sha512-iRP+QKI2+oz3UAh4nPEq14CsEjrjD6a5+fuypjScisAh9kXKFvdJOZJDwk7kikLvWVLGEs9+kIUS4LPQV7VZVw== + +"@firebase/analytics@0.10.0": + version "0.10.0" + resolved "https://registry.yarnpkg.com/@firebase/analytics/-/analytics-0.10.0.tgz#9c6986acd573c6c6189ffb52d0fd63c775db26d7" + integrity sha512-Locv8gAqx0e+GX/0SI3dzmBY5e9kjVDtD+3zCFLJ0tH2hJwuCAiL+5WkHuxKj92rqQj/rvkBUCfA1ewlX2hehg== + dependencies: + "@firebase/component" "0.6.4" + "@firebase/installations" "0.6.4" + "@firebase/logger" "0.4.0" + "@firebase/util" "1.9.3" + tslib "^2.1.0" + +"@firebase/app-check-compat@0.3.7": + version "0.3.7" + resolved "https://registry.yarnpkg.com/@firebase/app-check-compat/-/app-check-compat-0.3.7.tgz#e150f61d653a0f2043a34dcb995616a717161839" + integrity sha512-cW682AxsyP1G+Z0/P7pO/WT2CzYlNxoNe5QejVarW2o5ZxeWSSPAiVEwpEpQR/bUlUmdeWThYTMvBWaopdBsqw== + dependencies: + "@firebase/app-check" "0.8.0" + "@firebase/app-check-types" "0.5.0" + "@firebase/component" "0.6.4" + "@firebase/logger" "0.4.0" + "@firebase/util" "1.9.3" + tslib "^2.1.0" + +"@firebase/app-check-interop-types@0.3.0": + version "0.3.0" + resolved "https://registry.yarnpkg.com/@firebase/app-check-interop-types/-/app-check-interop-types-0.3.0.tgz#b27ea1397cb80427f729e4bbf3a562f2052955c4" + integrity sha512-xAxHPZPIgFXnI+vb4sbBjZcde7ZluzPPaSK7Lx3/nmuVk4TjZvnL8ONnkd4ERQKL8WePQySU+pRcWkh8rDf5Sg== + +"@firebase/app-check-types@0.5.0": + version "0.5.0" + resolved "https://registry.yarnpkg.com/@firebase/app-check-types/-/app-check-types-0.5.0.tgz#1b02826213d7ce6a1cf773c329b46ea1c67064f4" + integrity sha512-uwSUj32Mlubybw7tedRzR24RP8M8JUVR3NPiMk3/Z4bCmgEKTlQBwMXrehDAZ2wF+TsBq0SN1c6ema71U/JPyQ== + +"@firebase/app-check@0.8.0": + version "0.8.0" + resolved "https://registry.yarnpkg.com/@firebase/app-check/-/app-check-0.8.0.tgz#b531ec40900af9c3cf1ec63de9094a0ddd733d6a" + integrity sha512-dRDnhkcaC2FspMiRK/Vbp+PfsOAEP6ZElGm9iGFJ9fDqHoPs0HOPn7dwpJ51lCFi1+2/7n5pRPGhqF/F03I97g== + dependencies: + "@firebase/component" "0.6.4" + "@firebase/logger" "0.4.0" + "@firebase/util" "1.9.3" + tslib "^2.1.0" + +"@firebase/app-compat@0.2.20": + version "0.2.20" + resolved "https://registry.yarnpkg.com/@firebase/app-compat/-/app-compat-0.2.20.tgz#df996427ce781d51e439e6fee42e5d954645f7bb" + integrity sha512-FXgdjgwUruLMZMh0HDwLmbcu2ImckT10HPdXZyzIJoaor9OenoTQO2RLk2xvvOL/JJnszN6kmv56c+8qA4KFXQ== + dependencies: + "@firebase/app" "0.9.20" + "@firebase/component" "0.6.4" + "@firebase/logger" "0.4.0" + "@firebase/util" "1.9.3" + tslib "^2.1.0" + +"@firebase/app-types@0.9.0": + version "0.9.0" + resolved "https://registry.yarnpkg.com/@firebase/app-types/-/app-types-0.9.0.tgz#35b5c568341e9e263b29b3d2ba0e9cfc9ec7f01e" + integrity sha512-AeweANOIo0Mb8GiYm3xhTEBVCmPwTYAu9Hcd2qSkLuga/6+j9b1Jskl5bpiSQWy9eJ/j5pavxj6eYogmnuzm+Q== + +"@firebase/app@0.9.20": + version "0.9.20" + resolved "https://registry.yarnpkg.com/@firebase/app/-/app-0.9.20.tgz#d5a1d21d3661bf1465189d1b7bde30a3cff97f95" + integrity sha512-cMTDHr+1GfYyHBSLLvvTE8ywlDCKk/E8cUZmfv0ODmUBB1vXgrICShj7yH9UYf6m7l6pxad8T+qI/oAoAkCp2Q== + dependencies: + "@firebase/component" "0.6.4" + "@firebase/logger" "0.4.0" + "@firebase/util" "1.9.3" + idb "7.1.1" + tslib "^2.1.0" + +"@firebase/auth-compat@0.4.6": + version "0.4.6" + resolved "https://registry.yarnpkg.com/@firebase/auth-compat/-/auth-compat-0.4.6.tgz#413568be48d23a17aa14438b8aad86556bd1e132" + integrity sha512-pKp1d4fSf+yoy1EBjTx9ISxlunqhW0vTICk0ByZ3e+Lp6ZIXThfUy4F1hAJlEafD/arM0oepRiAh7LXS1xn/BA== + dependencies: + "@firebase/auth" "1.3.0" + "@firebase/auth-types" "0.12.0" + "@firebase/component" "0.6.4" + "@firebase/util" "1.9.3" + node-fetch "2.6.7" + tslib "^2.1.0" + +"@firebase/auth-interop-types@0.2.1": + version "0.2.1" + resolved "https://registry.yarnpkg.com/@firebase/auth-interop-types/-/auth-interop-types-0.2.1.tgz#78884f24fa539e34a06c03612c75f222fcc33742" + integrity sha512-VOaGzKp65MY6P5FI84TfYKBXEPi6LmOCSMMzys6o2BN2LOsqy7pCuZCup7NYnfbk5OkkQKzvIfHOzTm0UDpkyg== + +"@firebase/auth-types@0.12.0": + version "0.12.0" + resolved "https://registry.yarnpkg.com/@firebase/auth-types/-/auth-types-0.12.0.tgz#f28e1b68ac3b208ad02a15854c585be6da3e8e79" + integrity sha512-pPwaZt+SPOshK8xNoiQlK5XIrS97kFYc3Rc7xmy373QsOJ9MmqXxLaYssP5Kcds4wd2qK//amx/c+A8O2fVeZA== + +"@firebase/auth@1.3.0": + version "1.3.0" + resolved "https://registry.yarnpkg.com/@firebase/auth/-/auth-1.3.0.tgz#514d77309fdef5cc0ae81d5f57cb07bdaf6822d7" + integrity sha512-vjK4CHbY9aWdiVOrKi6mpa8z6uxeaf7LB/MZTHuZOiGHMcUoTGB6TeMbRShyqk1uaMrxhhZ5Ar/dR0965E1qyA== + dependencies: + "@firebase/component" "0.6.4" + "@firebase/logger" "0.4.0" + "@firebase/util" "1.9.3" + node-fetch "2.6.7" + tslib "^2.1.0" + +"@firebase/component@0.6.4": + version "0.6.4" + resolved "https://registry.yarnpkg.com/@firebase/component/-/component-0.6.4.tgz#8981a6818bd730a7554aa5e0516ffc9b1ae3f33d" + integrity sha512-rLMyrXuO9jcAUCaQXCMjCMUsWrba5fzHlNK24xz5j2W6A/SRmK8mZJ/hn7V0fViLbxC0lPMtrK1eYzk6Fg03jA== + dependencies: + "@firebase/util" "1.9.3" + tslib "^2.1.0" + +"@firebase/database-compat@1.0.1": + version "1.0.1" + resolved "https://registry.yarnpkg.com/@firebase/database-compat/-/database-compat-1.0.1.tgz#ab0acbbfb0031080cc16504cef6d00c95cf27ff1" + integrity sha512-ky82yLIboLxtAIWyW/52a6HLMVTzD2kpZlEilVDok73pNPLjkJYowj8iaIWK5nTy7+6Gxt7d00zfjL6zckGdXQ== + dependencies: + "@firebase/component" "0.6.4" + "@firebase/database" "1.0.1" + "@firebase/database-types" "1.0.0" + "@firebase/logger" "0.4.0" + "@firebase/util" "1.9.3" + tslib "^2.1.0" + +"@firebase/database-types@1.0.0": + version "1.0.0" + resolved "https://registry.yarnpkg.com/@firebase/database-types/-/database-types-1.0.0.tgz#3f7f71c2c3fd1e29d15fce513f14dae2e7543f2a" + integrity sha512-SjnXStoE0Q56HcFgNQ+9SsmJc0c8TqGARdI/T44KXy+Ets3r6x/ivhQozT66bMnCEjJRywYoxNurRTMlZF8VNg== + dependencies: + "@firebase/app-types" "0.9.0" + "@firebase/util" "1.9.3" + +"@firebase/database@1.0.1": + version "1.0.1" + resolved "https://registry.yarnpkg.com/@firebase/database/-/database-1.0.1.tgz#28830f1d0c05ec2f7014658a3165129cec891bcb" + integrity sha512-VAhF7gYwunW4Lw/+RQZvW8dlsf2r0YYqV9W0Gi2Mz8+0TGg1mBJWoUtsHfOr8kPJXhcLsC4eP/z3x6L/Fvjk/A== + dependencies: + "@firebase/auth-interop-types" "0.2.1" + "@firebase/component" "0.6.4" + "@firebase/logger" "0.4.0" + "@firebase/util" "1.9.3" + faye-websocket "0.11.4" + tslib "^2.1.0" + +"@firebase/firestore-compat@0.3.19": + version "0.3.19" + resolved "https://registry.yarnpkg.com/@firebase/firestore-compat/-/firestore-compat-0.3.19.tgz#71e14de8866fa8f30a6d55b68cc572f258feb11a" + integrity sha512-hRcW9oTyluap8Qko/yqtgk4O/BJmR4FxkvF+P6LVvoqtspKLfQL70jJvzr1gYCCXn2OY8XUI7Q9BVdsTzEEONA== + dependencies: + "@firebase/component" "0.6.4" + "@firebase/firestore" "4.3.0" + "@firebase/firestore-types" "3.0.0" + "@firebase/util" "1.9.3" + tslib "^2.1.0" + +"@firebase/firestore-types@3.0.0": + version "3.0.0" + resolved "https://registry.yarnpkg.com/@firebase/firestore-types/-/firestore-types-3.0.0.tgz#f3440d5a1cc2a722d361b24cefb62ca8b3577af3" + integrity sha512-Meg4cIezHo9zLamw0ymFYBD4SMjLb+ZXIbuN7T7ddXN6MGoICmOTq3/ltdCGoDCS2u+H1XJs2u/cYp75jsX9Qw== + +"@firebase/firestore@4.3.0": + version "4.3.0" + resolved "https://registry.yarnpkg.com/@firebase/firestore/-/firestore-4.3.0.tgz#229de93fa15ed4898b423ea97a693b30e23f1751" + integrity sha512-FwSMCxGdUuA9Su74I9himAKJogzjU41IBjjnNf0+5smORMKtWlNeeXqMpljrhZubj5V+GmWyExf5UD3y1in6FA== + dependencies: + "@firebase/component" "0.6.4" + "@firebase/logger" "0.4.0" + "@firebase/util" "1.9.3" + "@firebase/webchannel-wrapper" "0.10.3" + "@grpc/grpc-js" "~1.9.0" + "@grpc/proto-loader" "^0.7.8" + node-fetch "2.6.7" + tslib "^2.1.0" + +"@firebase/functions-compat@0.3.5": + version "0.3.5" + resolved "https://registry.yarnpkg.com/@firebase/functions-compat/-/functions-compat-0.3.5.tgz#7a532d3a9764c6d5fbc1ec5541a989a704326647" + integrity sha512-uD4jwgwVqdWf6uc3NRKF8cSZ0JwGqSlyhPgackyUPe+GAtnERpS4+Vr66g0b3Gge0ezG4iyHo/EXW/Hjx7QhHw== + dependencies: + "@firebase/component" "0.6.4" + "@firebase/functions" "0.10.0" + "@firebase/functions-types" "0.6.0" + "@firebase/util" "1.9.3" + tslib "^2.1.0" + +"@firebase/functions-types@0.6.0": + version "0.6.0" + resolved "https://registry.yarnpkg.com/@firebase/functions-types/-/functions-types-0.6.0.tgz#ccd7000dc6fc668f5acb4e6a6a042a877a555ef2" + integrity sha512-hfEw5VJtgWXIRf92ImLkgENqpL6IWpYaXVYiRkFY1jJ9+6tIhWM7IzzwbevwIIud/jaxKVdRzD7QBWfPmkwCYw== + +"@firebase/functions@0.10.0": + version "0.10.0" + resolved "https://registry.yarnpkg.com/@firebase/functions/-/functions-0.10.0.tgz#c630ddf12cdf941c25bc8d554e30c3226cd560f6" + integrity sha512-2U+fMNxTYhtwSpkkR6WbBcuNMOVaI7MaH3cZ6UAeNfj7AgEwHwMIFLPpC13YNZhno219F0lfxzTAA0N62ndWzA== + dependencies: + "@firebase/app-check-interop-types" "0.3.0" + "@firebase/auth-interop-types" "0.2.1" + "@firebase/component" "0.6.4" + "@firebase/messaging-interop-types" "0.2.0" + "@firebase/util" "1.9.3" + node-fetch "2.6.7" + tslib "^2.1.0" + +"@firebase/installations-compat@0.2.4": + version "0.2.4" + resolved "https://registry.yarnpkg.com/@firebase/installations-compat/-/installations-compat-0.2.4.tgz#b5557c897b4cd3635a59887a8bf69c3731aaa952" + integrity sha512-LI9dYjp0aT9Njkn9U4JRrDqQ6KXeAmFbRC0E7jI7+hxl5YmRWysq5qgQl22hcWpTk+cm3es66d/apoDU/A9n6Q== + dependencies: + "@firebase/component" "0.6.4" + "@firebase/installations" "0.6.4" + "@firebase/installations-types" "0.5.0" + "@firebase/util" "1.9.3" + tslib "^2.1.0" + +"@firebase/installations-types@0.5.0": + version "0.5.0" + resolved "https://registry.yarnpkg.com/@firebase/installations-types/-/installations-types-0.5.0.tgz#2adad64755cd33648519b573ec7ec30f21fb5354" + integrity sha512-9DP+RGfzoI2jH7gY4SlzqvZ+hr7gYzPODrbzVD82Y12kScZ6ZpRg/i3j6rleto8vTFC8n6Len4560FnV1w2IRg== + +"@firebase/installations@0.6.4": + version "0.6.4" + resolved "https://registry.yarnpkg.com/@firebase/installations/-/installations-0.6.4.tgz#20382e33e6062ac5eff4bede8e468ed4c367609e" + integrity sha512-u5y88rtsp7NYkCHC3ElbFBrPtieUybZluXyzl7+4BsIz4sqb4vSAuwHEUgCgCeaQhvsnxDEU6icly8U9zsJigA== + dependencies: + "@firebase/component" "0.6.4" + "@firebase/util" "1.9.3" + idb "7.0.1" + tslib "^2.1.0" + +"@firebase/logger@0.4.0": + version "0.4.0" + resolved "https://registry.yarnpkg.com/@firebase/logger/-/logger-0.4.0.tgz#15ecc03c452525f9d47318ad9491b81d1810f113" + integrity sha512-eRKSeykumZ5+cJPdxxJRgAC3G5NknY2GwEbKfymdnXtnT0Ucm4pspfR6GT4MUQEDuJwRVbVcSx85kgJulMoFFA== + dependencies: + tslib "^2.1.0" + +"@firebase/messaging-compat@0.2.4": + version "0.2.4" + resolved "https://registry.yarnpkg.com/@firebase/messaging-compat/-/messaging-compat-0.2.4.tgz#323ca48deef77065b4fcda3cfd662c4337dffcfd" + integrity sha512-lyFjeUhIsPRYDPNIkYX1LcZMpoVbBWXX4rPl7c/rqc7G+EUea7IEtSt4MxTvh6fDfPuzLn7+FZADfscC+tNMfg== + dependencies: + "@firebase/component" "0.6.4" + "@firebase/messaging" "0.12.4" + "@firebase/util" "1.9.3" + tslib "^2.1.0" + +"@firebase/messaging-interop-types@0.2.0": + version "0.2.0" + resolved "https://registry.yarnpkg.com/@firebase/messaging-interop-types/-/messaging-interop-types-0.2.0.tgz#6056f8904a696bf0f7fdcf5f2ca8f008e8f6b064" + integrity sha512-ujA8dcRuVeBixGR9CtegfpU4YmZf3Lt7QYkcj693FFannwNuZgfAYaTmbJ40dtjB81SAu6tbFPL9YLNT15KmOQ== + +"@firebase/messaging@0.12.4": + version "0.12.4" + resolved "https://registry.yarnpkg.com/@firebase/messaging/-/messaging-0.12.4.tgz#ccb49df5ab97d5650c9cf5b8c77ddc34daafcfe0" + integrity sha512-6JLZct6zUaex4g7HI3QbzeUrg9xcnmDAPTWpkoMpd/GoSVWH98zDoWXMGrcvHeCAIsLpFMe4MPoZkJbrPhaASw== + dependencies: + "@firebase/component" "0.6.4" + "@firebase/installations" "0.6.4" + "@firebase/messaging-interop-types" "0.2.0" + "@firebase/util" "1.9.3" + idb "7.0.1" + tslib "^2.1.0" + +"@firebase/performance-compat@0.2.4": + version "0.2.4" + resolved "https://registry.yarnpkg.com/@firebase/performance-compat/-/performance-compat-0.2.4.tgz#95cbf32057b5d9f0c75d804bc50e6ed3ba486274" + integrity sha512-nnHUb8uP9G8islzcld/k6Bg5RhX62VpbAb/Anj7IXs/hp32Eb2LqFPZK4sy3pKkBUO5wcrlRWQa6wKOxqlUqsg== + dependencies: + "@firebase/component" "0.6.4" + "@firebase/logger" "0.4.0" + "@firebase/performance" "0.6.4" + "@firebase/performance-types" "0.2.0" + "@firebase/util" "1.9.3" + tslib "^2.1.0" + +"@firebase/performance-types@0.2.0": + version "0.2.0" + resolved "https://registry.yarnpkg.com/@firebase/performance-types/-/performance-types-0.2.0.tgz#400685f7a3455970817136d9b48ce07a4b9562ff" + integrity sha512-kYrbr8e/CYr1KLrLYZZt2noNnf+pRwDq2KK9Au9jHrBMnb0/C9X9yWSXmZkFt4UIdsQknBq8uBB7fsybZdOBTA== + +"@firebase/performance@0.6.4": + version "0.6.4" + resolved "https://registry.yarnpkg.com/@firebase/performance/-/performance-0.6.4.tgz#0ad766bfcfab4f386f4fe0bef43bbcf505015069" + integrity sha512-HfTn/bd8mfy/61vEqaBelNiNnvAbUtME2S25A67Nb34zVuCSCRIX4SseXY6zBnOFj3oLisaEqhVcJmVPAej67g== + dependencies: + "@firebase/component" "0.6.4" + "@firebase/installations" "0.6.4" + "@firebase/logger" "0.4.0" + "@firebase/util" "1.9.3" + tslib "^2.1.0" + +"@firebase/remote-config-compat@0.2.4": + version "0.2.4" + resolved "https://registry.yarnpkg.com/@firebase/remote-config-compat/-/remote-config-compat-0.2.4.tgz#1f494c81a6c9560b1f9ca1b4fbd4bbbe47cf4776" + integrity sha512-FKiki53jZirrDFkBHglB3C07j5wBpitAaj8kLME6g8Mx+aq7u9P7qfmuSRytiOItADhWUj7O1JIv7n9q87SuwA== + dependencies: + "@firebase/component" "0.6.4" + "@firebase/logger" "0.4.0" + "@firebase/remote-config" "0.4.4" + "@firebase/remote-config-types" "0.3.0" + "@firebase/util" "1.9.3" + tslib "^2.1.0" + +"@firebase/remote-config-types@0.3.0": + version "0.3.0" + resolved "https://registry.yarnpkg.com/@firebase/remote-config-types/-/remote-config-types-0.3.0.tgz#689900dcdb3e5c059e8499b29db393e4e51314b4" + integrity sha512-RtEH4vdcbXZuZWRZbIRmQVBNsE7VDQpet2qFvq6vwKLBIQRQR5Kh58M4ok3A3US8Sr3rubYnaGqZSurCwI8uMA== + +"@firebase/remote-config@0.4.4": + version "0.4.4" + resolved "https://registry.yarnpkg.com/@firebase/remote-config/-/remote-config-0.4.4.tgz#6a496117054de58744bc9f382d2a6d1e14060c65" + integrity sha512-x1ioTHGX8ZwDSTOVp8PBLv2/wfwKzb4pxi0gFezS5GCJwbLlloUH4YYZHHS83IPxnua8b6l0IXUaWd0RgbWwzQ== + dependencies: + "@firebase/component" "0.6.4" + "@firebase/installations" "0.6.4" + "@firebase/logger" "0.4.0" + "@firebase/util" "1.9.3" + tslib "^2.1.0" + +"@firebase/storage-compat@0.3.2": + version "0.3.2" + resolved "https://registry.yarnpkg.com/@firebase/storage-compat/-/storage-compat-0.3.2.tgz#51a97170fd652a516f729f82b97af369e5a2f8d7" + integrity sha512-wvsXlLa9DVOMQJckbDNhXKKxRNNewyUhhbXev3t8kSgoCotd1v3MmqhKKz93ePhDnhHnDs7bYHy+Qa8dRY6BXw== + dependencies: + "@firebase/component" "0.6.4" + "@firebase/storage" "0.11.2" + "@firebase/storage-types" "0.8.0" + "@firebase/util" "1.9.3" + tslib "^2.1.0" + +"@firebase/storage-types@0.8.0": + version "0.8.0" + resolved "https://registry.yarnpkg.com/@firebase/storage-types/-/storage-types-0.8.0.tgz#f1e40a5361d59240b6e84fac7fbbbb622bfaf707" + integrity sha512-isRHcGrTs9kITJC0AVehHfpraWFui39MPaU7Eo8QfWlqW7YPymBmRgjDrlOgFdURh6Cdeg07zmkLP5tzTKRSpg== + +"@firebase/storage@0.11.2": + version "0.11.2" + resolved "https://registry.yarnpkg.com/@firebase/storage/-/storage-0.11.2.tgz#c5e0316543fe1c4026b8e3910f85ad73f5b77571" + integrity sha512-CtvoFaBI4hGXlXbaCHf8humajkbXhs39Nbh6MbNxtwJiCqxPy9iH3D3CCfXAvP0QvAAwmJUTK3+z9a++Kc4nkA== + dependencies: + "@firebase/component" "0.6.4" + "@firebase/util" "1.9.3" + node-fetch "2.6.7" + tslib "^2.1.0" + +"@firebase/util@1.9.3": + version "1.9.3" + resolved "https://registry.yarnpkg.com/@firebase/util/-/util-1.9.3.tgz#45458dd5cd02d90e55c656e84adf6f3decf4b7ed" + integrity sha512-DY02CRhOZwpzO36fHpuVysz6JZrscPiBXD0fXp6qSrL9oNOx5KWICKdR95C0lSITzxp0TZosVyHqzatE8JbcjA== + dependencies: + tslib "^2.1.0" + +"@firebase/webchannel-wrapper@0.10.3": + version "0.10.3" + resolved "https://registry.yarnpkg.com/@firebase/webchannel-wrapper/-/webchannel-wrapper-0.10.3.tgz#c894a21e8c911830e36bbbba55903ccfbc7a7e25" + integrity sha512-+ZplYUN3HOpgCfgInqgdDAbkGGVzES1cs32JJpeqoh87SkRobGXElJx+1GZSaDqzFL+bYiX18qEcBK76mYs8uA== + "@formatjs/ecma402-abstract@1.17.2": version "1.17.2" resolved "https://registry.yarnpkg.com/@formatjs/ecma402-abstract/-/ecma402-abstract-1.17.2.tgz#d197c6e26b9fd96ff7ba3b3a0cc2f25f1f2dcac3" @@ -1533,6 +1905,24 @@ resolved "https://registry.yarnpkg.com/@graphql-typed-document-node/core/-/core-3.2.0.tgz#5f3d96ec6b2354ad6d8a28bf216a1d97b5426861" integrity sha512-mB9oAsNCm9aM3/SOv4YtBMqZbYj10R7dkq8byBqxGY/ncFwhf2oQzMV+LCRlWoDSEBJ3COiR1yeDvMtsoOsuFQ== +"@grpc/grpc-js@~1.9.0": + version "1.9.5" + resolved "https://registry.yarnpkg.com/@grpc/grpc-js/-/grpc-js-1.9.5.tgz#22e283754b7b10d1ad26c3fb21849028dcaabc53" + integrity sha512-iouYNlPxRAwZ2XboDT+OfRKHuaKHiqjB5VFYZ0NFrHkbEF+AV3muIUY9olQsp8uxU4VvRCMiRk9ftzFDGb61aw== + dependencies: + "@grpc/proto-loader" "^0.7.8" + "@types/node" ">=12.12.47" + +"@grpc/proto-loader@^0.7.8": + version "0.7.10" + resolved "https://registry.yarnpkg.com/@grpc/proto-loader/-/proto-loader-0.7.10.tgz#6bf26742b1b54d0a473067743da5d3189d06d720" + integrity sha512-CAqDfoaQ8ykFd9zqBDn4k6iWT9loLAlc2ETmDFS9JCD70gDcnA4L3AFEo2iV7KyAtAAHFW9ftq1Fz+Vsgq80RQ== + dependencies: + lodash.camelcase "^4.3.0" + long "^5.0.0" + protobufjs "^7.2.4" + yargs "^17.7.2" + "@hapi/hoek@^9.0.0": version "9.3.0" resolved "https://registry.yarnpkg.com/@hapi/hoek/-/hoek-9.3.0.tgz#8368869dcb735be2e7f5cb7647de78e167a251fb" @@ -1721,6 +2111,59 @@ mkdirp "^1.0.4" rimraf "^3.0.2" +"@protobufjs/aspromise@^1.1.1", "@protobufjs/aspromise@^1.1.2": + version "1.1.2" + resolved "https://registry.yarnpkg.com/@protobufjs/aspromise/-/aspromise-1.1.2.tgz#9b8b0cc663d669a7d8f6f5d0893a14d348f30fbf" + integrity sha512-j+gKExEuLmKwvz3OgROXtrJ2UG2x8Ch2YZUxahh+s1F2HZ+wAceUNLkvy6zKCPVRkU++ZWQrdxsUeQXmcg4uoQ== + +"@protobufjs/base64@^1.1.2": + version "1.1.2" + resolved "https://registry.yarnpkg.com/@protobufjs/base64/-/base64-1.1.2.tgz#4c85730e59b9a1f1f349047dbf24296034bb2735" + integrity sha512-AZkcAA5vnN/v4PDqKyMR5lx7hZttPDgClv83E//FMNhR2TMcLUhfRUBHCmSl0oi9zMgDDqRUJkSxO3wm85+XLg== + +"@protobufjs/codegen@^2.0.4": + version "2.0.4" + resolved "https://registry.yarnpkg.com/@protobufjs/codegen/-/codegen-2.0.4.tgz#7ef37f0d010fb028ad1ad59722e506d9262815cb" + integrity sha512-YyFaikqM5sH0ziFZCN3xDC7zeGaB/d0IUb9CATugHWbd1FRFwWwt4ld4OYMPWu5a3Xe01mGAULCdqhMlPl29Jg== + +"@protobufjs/eventemitter@^1.1.0": + version "1.1.0" + resolved "https://registry.yarnpkg.com/@protobufjs/eventemitter/-/eventemitter-1.1.0.tgz#355cbc98bafad5978f9ed095f397621f1d066b70" + integrity sha512-j9ednRT81vYJ9OfVuXG6ERSTdEL1xVsNgqpkxMsbIabzSo3goCjDIveeGv5d03om39ML71RdmrGNjG5SReBP/Q== + +"@protobufjs/fetch@^1.1.0": + version "1.1.0" + resolved "https://registry.yarnpkg.com/@protobufjs/fetch/-/fetch-1.1.0.tgz#ba99fb598614af65700c1619ff06d454b0d84c45" + integrity sha512-lljVXpqXebpsijW71PZaCYeIcE5on1w5DlQy5WH6GLbFryLUrBD4932W/E2BSpfRJWseIL4v/KPgBFxDOIdKpQ== + dependencies: + "@protobufjs/aspromise" "^1.1.1" + "@protobufjs/inquire" "^1.1.0" + +"@protobufjs/float@^1.0.2": + version "1.0.2" + resolved "https://registry.yarnpkg.com/@protobufjs/float/-/float-1.0.2.tgz#5e9e1abdcb73fc0a7cb8b291df78c8cbd97b87d1" + integrity sha512-Ddb+kVXlXst9d+R9PfTIxh1EdNkgoRe5tOX6t01f1lYWOvJnSPDBlG241QLzcyPdoNTsblLUdujGSE4RzrTZGQ== + +"@protobufjs/inquire@^1.1.0": + version "1.1.0" + resolved "https://registry.yarnpkg.com/@protobufjs/inquire/-/inquire-1.1.0.tgz#ff200e3e7cf2429e2dcafc1140828e8cc638f089" + integrity sha512-kdSefcPdruJiFMVSbn801t4vFK7KB/5gd2fYvrxhuJYg8ILrmn9SKSX2tZdV6V+ksulWqS7aXjBcRXl3wHoD9Q== + +"@protobufjs/path@^1.1.2": + version "1.1.2" + resolved "https://registry.yarnpkg.com/@protobufjs/path/-/path-1.1.2.tgz#6cc2b20c5c9ad6ad0dccfd21ca7673d8d7fbf68d" + integrity sha512-6JOcJ5Tm08dOHAbdR3GrvP+yUUfkjG5ePsHYczMFLq3ZmMkAD98cDgcT2iA1lJ9NVwFd4tH/iSSoe44YWkltEA== + +"@protobufjs/pool@^1.1.0": + version "1.1.0" + resolved "https://registry.yarnpkg.com/@protobufjs/pool/-/pool-1.1.0.tgz#09fd15f2d6d3abfa9b65bc366506d6ad7846ff54" + integrity sha512-0kELaGSIDBKvcgS4zkjz1PeddatrjYcmMWOlAuAPwAeccUrPHdUqo/J6LiymHHEiJT5NrF1UVwxY14f+fy4WQw== + +"@protobufjs/utf8@^1.1.0": + version "1.1.0" + resolved "https://registry.yarnpkg.com/@protobufjs/utf8/-/utf8-1.1.0.tgz#a777360b5b39a1a2e5106f8e858f2fd2d060c570" + integrity sha512-Vvn3zZrhQZkkBE8LSuW3em98c0FwgO4nxzv6OdSxPKJIEKY2bGbHn+mhGIPerzI4twdxaP8/0+06HBpwf345Lw== + "@react-aria/checkbox@^3.2.1": version "3.11.1" resolved "https://registry.yarnpkg.com/@react-aria/checkbox/-/checkbox-3.11.1.tgz#80cf9548a8d8aee08cf91c0fb3bd21eeada5afa9" @@ -2836,10 +3279,10 @@ dependencies: "@types/istanbul-lib-report" "*" -"@types/node@*": - version "20.8.4" - resolved "https://registry.yarnpkg.com/@types/node/-/node-20.8.4.tgz#0e9ebb2ff29d5c3302fc84477d066fa7c6b441aa" - integrity sha512-ZVPnqU58giiCjSxjVUESDtdPk4QR5WQhhINbc9UBrKLU68MX5BF6kbQzTrkwbolyr0X8ChBpXfavr5mZFKZQ5A== +"@types/node@*", "@types/node@>=12.12.47", "@types/node@>=13.7.0": + version "20.8.6" + resolved "https://registry.yarnpkg.com/@types/node/-/node-20.8.6.tgz#0dbd4ebcc82ad0128df05d0e6f57e05359ee47fa" + integrity sha512-eWO4K2Ji70QzKUqRy6oyJWUeB7+g2cRagT3T/nxYibYcT4y2BDL8lqolRXjTHmkZCdJfIPaY73KbJAZmcryxTQ== dependencies: undici-types "~5.25.1" @@ -3963,9 +4406,9 @@ ee-first@1.1.1: integrity sha512-WMwm9LhRUo+WUaRN+vRuETqG89IgZphVSNkdFgeb6sS/E4OrDIN7t48CAewSHXc6C8lefD8KKfr5vY61brQlow== electron-to-chromium@^1.4.535: - version "1.4.551" - resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.4.551.tgz#14db6660a88f66ce095ea2657abe5653bc7f42ed" - integrity sha512-/Ng/W/kFv7wdEHYzxdK7Cv0BHEGSkSB3M0Ssl8Ndr1eMiYeas/+Mv4cNaDqamqWx6nd2uQZfPz6g25z25M/sdw== + version "1.4.554" + resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.4.554.tgz#04e09c2ee31dc0f1546174033809b54cc372740b" + integrity sha512-Q0umzPJjfBrrj8unkONTgbKQXzXRrH7sVV7D9ea2yBV3Oaogz991yhbpfvo2LMNkJItmruXTEzVpP9cp7vaIiQ== emoji-regex@^8.0.0: version "8.0.0" @@ -4285,6 +4728,13 @@ fastq@^1.6.0: dependencies: reusify "^1.0.4" +faye-websocket@0.11.4: + version "0.11.4" + resolved "https://registry.yarnpkg.com/faye-websocket/-/faye-websocket-0.11.4.tgz#7f0d9275cfdd86a1c963dc8b65fcc451edcbb1da" + integrity sha512-CzbClwlXAuiRQAlUyfqPgvPoNKTckTPGfwZV4ZdAhVcP2lh9KUxJg2b5GkE7XbjKQ3YJnQ9z6D9ntLAlB+tP8g== + dependencies: + websocket-driver ">=0.5.1" + fb-watchman@^2.0.0: version "2.0.2" resolved "https://registry.yarnpkg.com/fb-watchman/-/fb-watchman-2.0.2.tgz#e9524ee6b5c77e9e5001af0f85f3adbb8623255c" @@ -4394,6 +4844,38 @@ find-yarn-workspace-root@~2.0.0: dependencies: micromatch "^4.0.2" +firebase@^10.5.0: + version "10.5.0" + resolved "https://registry.yarnpkg.com/firebase/-/firebase-10.5.0.tgz#bc04ff746b0e6a7bd2bc21b63eeb46eb68d61c9d" + integrity sha512-ROwoOFQa7tZret/giHtVJH4YCRLCuKpN386mxzXd0likAVmv+38YGkJiqfkmZju7dIQ+QJOvBScXVf27Kvob0g== + dependencies: + "@firebase/analytics" "0.10.0" + "@firebase/analytics-compat" "0.2.6" + "@firebase/app" "0.9.20" + "@firebase/app-check" "0.8.0" + "@firebase/app-check-compat" "0.3.7" + "@firebase/app-compat" "0.2.20" + "@firebase/app-types" "0.9.0" + "@firebase/auth" "1.3.0" + "@firebase/auth-compat" "0.4.6" + "@firebase/database" "1.0.1" + "@firebase/database-compat" "1.0.1" + "@firebase/firestore" "4.3.0" + "@firebase/firestore-compat" "0.3.19" + "@firebase/functions" "0.10.0" + "@firebase/functions-compat" "0.3.5" + "@firebase/installations" "0.6.4" + "@firebase/installations-compat" "0.2.4" + "@firebase/messaging" "0.12.4" + "@firebase/messaging-compat" "0.2.4" + "@firebase/performance" "0.6.4" + "@firebase/performance-compat" "0.2.4" + "@firebase/remote-config" "0.4.4" + "@firebase/remote-config-compat" "0.2.4" + "@firebase/storage" "0.11.2" + "@firebase/storage-compat" "0.3.2" + "@firebase/util" "1.9.3" + flow-enums-runtime@^0.0.5: version "0.0.5" resolved "https://registry.yarnpkg.com/flow-enums-runtime/-/flow-enums-runtime-0.0.5.tgz#95884bfcc82edaf27eef7e1dd09732331cfbafbc" @@ -4480,9 +4962,9 @@ fsevents@^2.3.2: integrity sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw== function-bind@^1.1.1: - version "1.1.1" - resolved "https://registry.yarnpkg.com/function-bind/-/function-bind-1.1.1.tgz#a56899d3ea3c9bab874bb9773b7c5ede92f4895d" - integrity sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A== + version "1.1.2" + resolved "https://registry.yarnpkg.com/function-bind/-/function-bind-1.1.2.tgz#2c02d864d97f3ea6c8830c464cbd11ab6eab7a1c" + integrity sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA== gensync@^1.0.0-beta.2: version "1.0.0-beta.2" @@ -4675,6 +5157,11 @@ http-errors@2.0.0: statuses "2.0.1" toidentifier "1.0.1" +http-parser-js@>=0.5.1: + version "0.5.8" + resolved "https://registry.yarnpkg.com/http-parser-js/-/http-parser-js-0.5.8.tgz#af23090d9ac4e24573de6f6aecc9d84a48bf20e3" + integrity sha512-SGeBX54F94Wgu5RH3X5jsDtf4eHyRogWX1XGT3b4HuW3tQPM4AaBzoUji/4AAJNXCEOWZ5O0DgZmJw1947gD5Q== + https-proxy-agent@^5.0.1: version "5.0.1" resolved "https://registry.yarnpkg.com/https-proxy-agent/-/https-proxy-agent-5.0.1.tgz#c59ef224a04fe8b754f3db0063a25ea30d0005d6" @@ -4700,6 +5187,16 @@ iconv-lite@0.4.24: dependencies: safer-buffer ">= 2.1.2 < 3" +idb@7.0.1: + version "7.0.1" + resolved "https://registry.yarnpkg.com/idb/-/idb-7.0.1.tgz#d2875b3a2f205d854ee307f6d196f246fea590a7" + integrity sha512-UUxlE7vGWK5RfB/fDwEGgRf84DY/ieqNha6msMV99UsEMQhJ1RwbCd8AYBj3QMgnE3VZnfQvm4oKVCJTYlqIgg== + +idb@7.1.1: + version "7.1.1" + resolved "https://registry.yarnpkg.com/idb/-/idb-7.1.1.tgz#d910ded866d32c7ced9befc5bfdf36f572ced72b" + integrity sha512-gchesWBzyvGHRO9W8tzUWFDycow5gwjvFKfyV9FF32Y7F50yZMp7mP+T2mJIWFx49zicqyC4uefHM17o6xKIVQ== + ieee754@^1.1.13: version "1.2.1" resolved "https://registry.yarnpkg.com/ieee754/-/ieee754-1.2.1.tgz#8eb7a10a63fff25d15a57b001586d177d1b0d352" @@ -5282,6 +5779,11 @@ locate-path@^6.0.0: dependencies: p-locate "^5.0.0" +lodash.camelcase@^4.3.0: + version "4.3.0" + resolved "https://registry.yarnpkg.com/lodash.camelcase/-/lodash.camelcase-4.3.0.tgz#b28aa6288a2b9fc651035c7711f65ab6190331a6" + integrity sha512-TwuEnCnxbc3rAvhf/LbG7tJUDzhqXyFnv3dtzLOPgCG/hODL7WFnsbwktkD7yUV0RrreP/l1PALq/YSg6VvjlA== + lodash.clonedeep@^4.5.0: version "4.5.0" resolved "https://registry.yarnpkg.com/lodash.clonedeep/-/lodash.clonedeep-4.5.0.tgz#e23f3f9c4f8fbdde872529c1071857a086e5ccef" @@ -5381,6 +5883,11 @@ logkitty@^0.7.1: dayjs "^1.8.15" yargs "^15.1.0" +long@^5.0.0: + version "5.2.3" + resolved "https://registry.yarnpkg.com/long/-/long-5.2.3.tgz#a3ba97f3877cf1d778eccbcb048525ebb77499e1" + integrity sha512-lcHwpNoggQTObv5apGNCTdJrO69eHOZMi4BNC+rTLER8iHAqGrUVeLh/irVIM7zTw2bOXA8T6uNPeujwOLg/2Q== + loose-envify@^1.0.0, loose-envify@^1.1.0, loose-envify@^1.4.0: version "1.4.0" resolved "https://registry.yarnpkg.com/loose-envify/-/loose-envify-1.4.0.tgz#71ee51fa7be4caec1a63839f7e682d8132d30caf" @@ -5983,6 +6490,13 @@ node-dir@^0.1.17: dependencies: minimatch "^3.0.2" +node-fetch@2.6.7: + version "2.6.7" + resolved "https://registry.yarnpkg.com/node-fetch/-/node-fetch-2.6.7.tgz#24de9fba827e3b4ae44dc8b20256a379160052ad" + integrity sha512-ZjMPFEfVx5j+y2yF35Kzx5sF7kDzxuDj6ziH4FFbOp87zKDZNx8yExJIb05OGF4Nlt9IHFIMBkRl41VdvcNdbQ== + dependencies: + whatwg-url "^5.0.0" + node-fetch@^2.2.0, node-fetch@^2.6.0, node-fetch@^2.6.1, node-fetch@^2.6.12, node-fetch@^2.6.7: version "2.7.0" resolved "https://registry.yarnpkg.com/node-fetch/-/node-fetch-2.7.0.tgz#d0f0fa6e3e2dc1d27efcd8ad99d550bda94d187d" @@ -6419,6 +6933,24 @@ prop-types@*, prop-types@^15.8.1: object-assign "^4.1.1" react-is "^16.13.1" +protobufjs@^7.2.4: + version "7.2.5" + resolved "https://registry.yarnpkg.com/protobufjs/-/protobufjs-7.2.5.tgz#45d5c57387a6d29a17aab6846dcc283f9b8e7f2d" + integrity sha512-gGXRSXvxQ7UiPgfw8gevrfRWcTlSbOFg+p/N+JVJEK5VhueL2miT6qTymqAmjr1Q5WbOCyJbyrk6JfWKwlFn6A== + dependencies: + "@protobufjs/aspromise" "^1.1.2" + "@protobufjs/base64" "^1.1.2" + "@protobufjs/codegen" "^2.0.4" + "@protobufjs/eventemitter" "^1.1.0" + "@protobufjs/fetch" "^1.1.0" + "@protobufjs/float" "^1.0.2" + "@protobufjs/inquire" "^1.1.0" + "@protobufjs/path" "^1.1.2" + "@protobufjs/pool" "^1.1.0" + "@protobufjs/utf8" "^1.1.0" + "@types/node" ">=13.7.0" + long "^5.0.0" + pump@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/pump/-/pump-3.0.0.tgz#b4a2116815bde2f4e1ea602354e8c75565107a64" @@ -6851,7 +7383,7 @@ safe-buffer@5.1.2, safe-buffer@~5.1.0, safe-buffer@~5.1.1: resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.1.2.tgz#991ec69d296e0313747d59bdfd2b745c35f8828d" integrity sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g== -safe-buffer@~5.2.0: +safe-buffer@>=5.1.0, safe-buffer@~5.2.0: version "5.2.1" resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.2.1.tgz#1eaf9fa9bdb1fdd4ec75f58f9cdb4e6b7827eec6" integrity sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ== @@ -7673,6 +8205,20 @@ webidl-conversions@^3.0.0: resolved "https://registry.yarnpkg.com/webidl-conversions/-/webidl-conversions-3.0.1.tgz#24534275e2a7bc6be7bc86611cc16ae0a5654871" integrity sha512-2JAn3z8AR6rjK8Sm8orRC0h/bcl/DqL7tRPdGZ4I1CjdF+EaMLmYxBHyXuKL849eucPFhvBoxMsflfOb8kxaeQ== +websocket-driver@>=0.5.1: + version "0.7.4" + resolved "https://registry.yarnpkg.com/websocket-driver/-/websocket-driver-0.7.4.tgz#89ad5295bbf64b480abcba31e4953aca706f5760" + integrity sha512-b17KeDIQVjvb0ssuSDF2cYXSg2iztliJ4B9WdsuB6J952qCPKmnVq4DyW5motImXHDC1cBT/1UezrJVsKw5zjg== + dependencies: + http-parser-js ">=0.5.1" + safe-buffer ">=5.1.0" + websocket-extensions ">=0.1.1" + +websocket-extensions@>=0.1.1: + version "0.1.4" + resolved "https://registry.yarnpkg.com/websocket-extensions/-/websocket-extensions-0.1.4.tgz#7f8473bc839dfd87608adb95d7eb075211578a42" + integrity sha512-OqedPIGOfsDlo31UNwYbCFMSaO9m9G/0faIHj5/dZFDMFqPTcx6UwqyOy3COEaEOg/9VsGIpdqn62W5KhoKSpg== + whatwg-fetch@^3.0.0: version "3.6.19" resolved "https://registry.yarnpkg.com/whatwg-fetch/-/whatwg-fetch-3.6.19.tgz#caefd92ae630b91c07345537e67f8354db470973" @@ -7855,7 +8401,7 @@ yargs@^15.1.0: y18n "^4.0.0" yargs-parser "^18.1.2" -yargs@^17.6.2: +yargs@^17.6.2, yargs@^17.7.2: version "17.7.2" resolved "https://registry.yarnpkg.com/yargs/-/yargs-17.7.2.tgz#991df39aca675a192b816e1e0363f9d75d2aa269" integrity sha512-7dSzzRQ++CKnNI/krKnYRV7JKKPUXMEh61soaHKg9mrWEhzFWhFnxPxGl+69cD1Ou63C13NUPCnmIcrvqCuM6w== From 90e001ce06de0269baa70776edb99b15c6f6d5dc Mon Sep 17 00:00:00 2001 From: akshayd2020 Date: Sun, 15 Oct 2023 17:26:25 -0400 Subject: [PATCH 03/22] Added first component --- .../src/components/reusable/ScreenWideInput.tsx | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 client-new/src/components/reusable/ScreenWideInput.tsx diff --git a/client-new/src/components/reusable/ScreenWideInput.tsx b/client-new/src/components/reusable/ScreenWideInput.tsx new file mode 100644 index 0000000..a819580 --- /dev/null +++ b/client-new/src/components/reusable/ScreenWideInput.tsx @@ -0,0 +1,11 @@ +import { Center, Input } from "native-base"; +import { widthPercentageToDP as w, heightPercentageToDP as h } from "react-native-responsive-screen"; + +type ScreenWideInputProps = { + placeholder?: string; +} + +export default function ScreenWideInput(props: ScreenWideInputProps) { + return(<>) +} \ No newline at end of file From 68f4f56cad2b88e6a792b3f1cc11cda2d769fb59 Mon Sep 17 00:00:00 2001 From: akshayd2020 Date: Sun, 15 Oct 2023 19:23:28 -0400 Subject: [PATCH 04/22] Updated screen content component --- client-new/firebase.ts | 17 +++ client-new/package.json | 4 +- .../components/reusable/ScreenWideInput.tsx | 54 ++++++- client-new/src/contexts/AuthContext.tsx | 75 ++++++++++ client-new/src/screens/auth/AccessScreen.tsx | 132 ++++++++++-------- client-new/yarn.lock | 37 ++++- 6 files changed, 249 insertions(+), 70 deletions(-) create mode 100644 client-new/firebase.ts create mode 100644 client-new/src/contexts/AuthContext.tsx diff --git a/client-new/firebase.ts b/client-new/firebase.ts new file mode 100644 index 0000000..c6a9f9b --- /dev/null +++ b/client-new/firebase.ts @@ -0,0 +1,17 @@ +import * as firebase from "firebase/app"; +import * as firebaseAuth from "firebase/auth"; + +const firebaseConfig = { + apiKey: "AIzaSyDjdkEvyE9m0URAbvyFSIpJVNI-xEATs84", + authDomain: "legacy-4ba7f.firebaseapp.com", + projectId: "legacy-4ba7f", + storageBucket: "legacy-4ba7f.appspot.com", + messagingSenderId: "403289696368", + appId: "1:403289696368:web:eae1fe6606facbbfdf6cb5", + measurementId: "G-ES6PJGKJTJ" + }; + +// Initialize Firebase +const app = firebase.initializeApp(firebaseConfig); + +export const auth = firebaseAuth.getAuth(app);; diff --git a/client-new/package.json b/client-new/package.json index cc281d0..bd14356 100644 --- a/client-new/package.json +++ b/client-new/package.json @@ -10,6 +10,7 @@ "ts:check": "tsc" }, "dependencies": { + "@expo/vector-icons": "^13.0.0", "@react-navigation/native": "^6.1.8", "@react-navigation/native-stack": "^6.9.14", "@types/react": "^18.2.28", @@ -27,7 +28,8 @@ "react-native-responsive-screen": "^1.4.2", "react-native-safe-area-context": "^4.7.2", "react-native-screens": "^3.25.0", - "react-native-svg": "^13.14.0" + "react-native-svg": "^13.14.0", + "react-native-vector-icons": "^10.0.0" }, "devDependencies": { "@babel/core": "^7.20.0", diff --git a/client-new/src/components/reusable/ScreenWideInput.tsx b/client-new/src/components/reusable/ScreenWideInput.tsx index a819580..37fb964 100644 --- a/client-new/src/components/reusable/ScreenWideInput.tsx +++ b/client-new/src/components/reusable/ScreenWideInput.tsx @@ -1,11 +1,51 @@ -import { Center, Input } from "native-base"; -import { widthPercentageToDP as w, heightPercentageToDP as h } from "react-native-responsive-screen"; +import { Input, FormControl, Container, Button } from "native-base"; +import React, { useState } from "react"; +import { + widthPercentageToDP as w, + heightPercentageToDP as h, +} from "react-native-responsive-screen"; +import { FontAwesome } from "@expo/vector-icons"; type ScreenWideInputProps = { - placeholder?: string; -} + title?: string; + password?: boolean; + placeholderText?: string; + onChangeText: (value) => void; + icon?: string; + value: string; +}; export default function ScreenWideInput(props: ScreenWideInputProps) { - return(<>) -} \ No newline at end of file + const [show, setShow] = useState(false); + + const handleClick = () => setShow(!show); + + const inputLeftElement = props.icon ? ( + + ) : undefined; + + const inputRightElement = props.password ? ( + + ) : undefined; + + return ( + <> + + {props.title} + props.onChangeText(value)} + placeholder={props.placeholderText} + InputLeftElement={inputLeftElement} + InputRightElement={inputRightElement} + /> + + + ); +} diff --git a/client-new/src/contexts/AuthContext.tsx b/client-new/src/contexts/AuthContext.tsx new file mode 100644 index 0000000..a99c582 --- /dev/null +++ b/client-new/src/contexts/AuthContext.tsx @@ -0,0 +1,75 @@ +import React, { PropsWithChildren, useContext, useEffect, useState } from "react"; +import firebase from "firebase/app"; +import { + User as FirebaseUser, + createUserWithEmailAndPassword, + signInWithEmailAndPassword, +} from "firebase/auth"; +import { auth } from "../../firebase"; + +type AuthContextData = { + user: FirebaseUser | null; + createAccount: (email: string, password: string) => Promise; + login: (email: string, password: string) => Promise; + logout: () => Promise +}; + +type AuthProviderProps = { + children?: React.ReactNode; +}; +const AuthContext = React.createContext({} as AuthContextData); + +export const AuthProvider: React.FC = ({ children }) => { + const [user, setUser] = useState(null); + + useEffect(() => { + const unsubscribe = auth.onAuthStateChanged((firebaseUser) => { + setUser(firebaseUser); + }); + + return unsubscribe; + }, []); + + const createAccount = async (username: string, password: string) => { + try { + const user = await createUserWithEmailAndPassword( + auth, + username, + password + ); + console.log(user); + + } catch (error) { + console.log(error.message); + } + }; + + const login = async (username: string, password: string) => { + try { + const user = await signInWithEmailAndPassword(auth, username, password); + console.log(user); + } catch (error) { + console.log(error.message); + } + }; + + const logout = async() => { + setUser(null); + } + + return ( + + {children} + + ); +}; + +export const useAuth = (): AuthContextData => { + const context = useContext(AuthContext); + + if (!context) { + throw new Error('useAuth must be used within an AuthProvider'); + } + + return context; + }; diff --git a/client-new/src/screens/auth/AccessScreen.tsx b/client-new/src/screens/auth/AccessScreen.tsx index 481c258..ef9487b 100644 --- a/client-new/src/screens/auth/AccessScreen.tsx +++ b/client-new/src/screens/auth/AccessScreen.tsx @@ -8,59 +8,69 @@ import ScreenWideInput from "../../components/reusable/ScreenWideInput"; export default function AccessScreen() { const { user, createAccount, login, logout } = useAuth(); - const [email, setEmail] = useState('') - const [password, setPassword] = useState('') + const [email, setEmail] = useState(""); + const [password, setPassword] = useState(""); const signUp = () => { - createAccount(email, password) - } + createAccount(email, password); + }; const signIn = () => { - login(email, password) - } + login(email, password); + }; return ( - - setEmail(text)} - style={styles.input} - /> - setPassword(text)} - style={styles.input} - secureTextEntry - /> - + + setEmail(text)} + style={styles.input} + /> + setPassword(text)} + style={styles.input} + secureTextEntry + /> + - - - Login - - - Register - - - Logout - - - - - + + + Login + + + Register + + + Logout + + + + setEmail(value)} + value={email} + /> + setPassword(value)} + value={password} + /> + ); @@ -69,46 +79,46 @@ export default function AccessScreen() { const styles = StyleSheet.create({ container: { flex: 1, - justifyContent: 'center', - alignItems: 'center', + justifyContent: "center", + alignItems: "center", }, inputContainer: { - width: '80%' + width: "80%", }, input: { - backgroundColor: 'white', + backgroundColor: "white", paddingHorizontal: 15, paddingVertical: 10, borderRadius: 10, marginTop: 5, }, buttonContainer: { - width: '60%', - justifyContent: 'center', - alignItems: 'center', + width: "60%", + justifyContent: "center", + alignItems: "center", marginTop: 40, }, button: { - backgroundColor: '#0782F9', - width: '100%', + backgroundColor: "#0782F9", + width: "100%", padding: 15, borderRadius: 10, - alignItems: 'center', + alignItems: "center", }, buttonOutline: { - backgroundColor: 'white', + backgroundColor: "white", marginTop: 5, - borderColor: '#0782F9', + borderColor: "#0782F9", borderWidth: 2, }, buttonText: { - color: 'white', - fontWeight: '700', + color: "white", + fontWeight: "700", fontSize: 16, }, buttonOutlineText: { - color: '#0782F9', - fontWeight: '700', + color: "#0782F9", + fontWeight: "700", fontSize: 16, }, -}) \ No newline at end of file +}); diff --git a/client-new/yarn.lock b/client-new/yarn.lock index ef53f2c..d076ef3 100644 --- a/client-new/yarn.lock +++ b/client-new/yarn.lock @@ -3962,6 +3962,15 @@ cliui@^6.0.0: strip-ansi "^6.0.0" wrap-ansi "^6.2.0" +cliui@^7.0.2: + version "7.0.4" + resolved "https://registry.yarnpkg.com/cliui/-/cliui-7.0.4.tgz#a0265ee655476fc807aea9df3df8df7783808b4f" + integrity sha512-OcRE68cOsVMXp1Yvonl/fzkQOyjLSu/8bhPDfQt0e0/Eb283TKP20Fs2MqoPsr9SwA595rRCA+QMzYc9nBP+JQ== + dependencies: + string-width "^4.2.0" + strip-ansi "^6.0.0" + wrap-ansi "^7.0.0" + cliui@^8.0.1: version "8.0.1" resolved "https://registry.yarnpkg.com/cliui/-/cliui-8.0.1.tgz#0c04b075db02cbfe60dc8e6cf2f5486b1a3608aa" @@ -6924,7 +6933,7 @@ prompts@^2.3.2, prompts@^2.4.0: kleur "^3.0.3" sisteransi "^1.0.5" -prop-types@*, prop-types@^15.8.1: +prop-types@*, prop-types@^15.7.2, prop-types@^15.8.1: version "15.8.1" resolved "https://registry.yarnpkg.com/prop-types/-/prop-types-15.8.1.tgz#67d87bf1a694f48435cf332c24af10214a3140b5" integrity sha512-oj87CgZICdulUohogVAR7AjlC0327U4el4L6eAvOqCeudMDVU0NThNaV+b9Df4dXgSP1gXMTnPdhfe/2qDH5cg== @@ -7110,6 +7119,14 @@ react-native-svg@^13.14.0: css-select "^5.1.0" css-tree "^1.1.3" +react-native-vector-icons@^10.0.0: + version "10.0.0" + resolved "https://registry.yarnpkg.com/react-native-vector-icons/-/react-native-vector-icons-10.0.0.tgz#0f031f7717f76f0a397f725de9b5a47ec87862e9" + integrity sha512-efMOVbZIebY8RszZPzPBoXi9pvD/NFYmjIDYxRoc9LYSzV8rMJtT8FfcO2hPu85Rn2x9xktha0+qn0B7EqMAcQ== + dependencies: + prop-types "^15.7.2" + yargs "^16.1.1" + react-native@0.72.5: version "0.72.5" resolved "https://registry.yarnpkg.com/react-native/-/react-native-0.72.5.tgz#2c343fa6f3ead362cf07376634a33a4078864357" @@ -8379,6 +8396,11 @@ yargs-parser@^18.1.2: camelcase "^5.0.0" decamelize "^1.2.0" +yargs-parser@^20.2.2: + version "20.2.9" + resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-20.2.9.tgz#2eb7dc3b0289718fc295f362753845c41a0c94ee" + integrity sha512-y11nGElTIV+CT3Zv9t7VKl+Q3hTQoT9a1Qzezhhl6Rp21gJ/IVTW7Z3y9EWXhuUBC2Shnf+DX0antecpAwSP8w== + yargs-parser@^21.1.1: version "21.1.1" resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-21.1.1.tgz#9096bceebf990d21bb31fa9516e0ede294a77d35" @@ -8401,6 +8423,19 @@ yargs@^15.1.0: y18n "^4.0.0" yargs-parser "^18.1.2" +yargs@^16.1.1: + version "16.2.0" + resolved "https://registry.yarnpkg.com/yargs/-/yargs-16.2.0.tgz#1c82bf0f6b6a66eafce7ef30e376f49a12477f66" + integrity sha512-D1mvvtDG0L5ft/jGWkLpG1+m0eQxOfaBvTNELraWj22wSVUMWxZUvYgJYcKh6jGGIkJFhH4IZPQhR4TKpc8mBw== + dependencies: + cliui "^7.0.2" + escalade "^3.1.1" + get-caller-file "^2.0.5" + require-directory "^2.1.1" + string-width "^4.2.0" + y18n "^5.0.5" + yargs-parser "^20.2.2" + yargs@^17.6.2, yargs@^17.7.2: version "17.7.2" resolved "https://registry.yarnpkg.com/yargs/-/yargs-17.7.2.tgz#991df39aca675a192b816e1e0363f9d75d2aa269" From 32b77396ac84eb93315d89bbe5366044abfebb5b Mon Sep 17 00:00:00 2001 From: Aryan Kale Date: Mon, 16 Oct 2023 18:37:22 -0400 Subject: [PATCH 05/22] Updated all reusable components --- client-new/package.json | 1 + .../components/reusable/ScreenWideButton.tsx | 39 ++++++ .../components/reusable/ScreenWideInput.tsx | 20 ++-- .../src/components/reusable/SquareButton.tsx | 16 +++ client-new/src/navigation/AuthStack.tsx | 2 +- .../{AccessScreen.tsx => LoginScreen.tsx} | 18 ++- client-new/src/screens/auth/SignUpScreen.tsx | 113 ++++++++++++++++++ client-new/yarn.lock | 5 + yarn.lock | 4 + 9 files changed, 203 insertions(+), 15 deletions(-) create mode 100644 client-new/src/components/reusable/ScreenWideButton.tsx create mode 100644 client-new/src/components/reusable/SquareButton.tsx rename client-new/src/screens/auth/{AccessScreen.tsx => LoginScreen.tsx} (83%) create mode 100644 client-new/src/screens/auth/SignUpScreen.tsx create mode 100644 yarn.lock diff --git a/client-new/package.json b/client-new/package.json index bd14356..1a7309c 100644 --- a/client-new/package.json +++ b/client-new/package.json @@ -23,6 +23,7 @@ "native-base": "^3.4.28", "react": "18.2.0", "react-dom": "^18.2.0", + "react-icons": "^4.11.0", "react-native": "0.72.5", "react-native-auth0": "^3.0.2", "react-native-responsive-screen": "^1.4.2", diff --git a/client-new/src/components/reusable/ScreenWideButton.tsx b/client-new/src/components/reusable/ScreenWideButton.tsx new file mode 100644 index 0000000..d379392 --- /dev/null +++ b/client-new/src/components/reusable/ScreenWideButton.tsx @@ -0,0 +1,39 @@ +import { Input, FormControl, Box, Text, Button } from "native-base"; +import React, {useState } from "react"; +import { + widthPercentageToDP as w, + heightPercentageToDP as h, + } from "react-native-responsive-screen"; + + +type ScreenWideButtonProps = { + text: string; + textColor: string; + backgroundColor: string; + onClick?: (input) => any; +}; + + + +export default function ScreenWideButton(props: ScreenWideButtonProps) { + + const buttonStyle = { + backgroundColor: props.backgroundColor, + width: w("80%"), + height: h("5%"), + borderRadius: w("80%") / 2 + }; + + const textStyle = { + color: props.textColor, + }; + + return ( + <> + + + ); +} + diff --git a/client-new/src/components/reusable/ScreenWideInput.tsx b/client-new/src/components/reusable/ScreenWideInput.tsx index 37fb964..8ca7c91 100644 --- a/client-new/src/components/reusable/ScreenWideInput.tsx +++ b/client-new/src/components/reusable/ScreenWideInput.tsx @@ -1,5 +1,5 @@ -import { Input, FormControl, Container, Button } from "native-base"; -import React, { useState } from "react"; +import { Input, FormControl, Container, Button, Text} from "native-base"; +import React, { ReactNode, useState } from "react"; import { widthPercentageToDP as w, heightPercentageToDP as h, @@ -11,31 +11,32 @@ type ScreenWideInputProps = { password?: boolean; placeholderText?: string; onChangeText: (value) => void; - icon?: string; + icon?: ReactNode; value: string; }; export default function ScreenWideInput(props: ScreenWideInputProps) { - const [show, setShow] = useState(false); + const [showPassword, setShowPassword] = useState(false); - const handleClick = () => setShow(!show); + const toggleShowPassword = () => setShowPassword(!showPassword); const inputLeftElement = props.icon ? ( - + props.icon ) : undefined; const inputRightElement = props.password ? ( - ) : undefined; + return ( <> {props.title} diff --git a/client-new/src/components/reusable/SquareButton.tsx b/client-new/src/components/reusable/SquareButton.tsx new file mode 100644 index 0000000..2e9e8c7 --- /dev/null +++ b/client-new/src/components/reusable/SquareButton.tsx @@ -0,0 +1,16 @@ +import { Button, Text } from "native-base"; + +type SquareButtonProps = { + title: string; + onClick?: (input) => any; +}; + +export default function SquareButton(props: SquareButtonProps) { + return ( + + + ) + +} \ No newline at end of file diff --git a/client-new/src/navigation/AuthStack.tsx b/client-new/src/navigation/AuthStack.tsx index 82dc2b8..8413734 100644 --- a/client-new/src/navigation/AuthStack.tsx +++ b/client-new/src/navigation/AuthStack.tsx @@ -1,5 +1,5 @@ import { createNativeStackNavigator } from "@react-navigation/native-stack"; -import AccessScreen from "../screens/auth/AccessScreen"; +import AccessScreen from "../screens/auth/LoginScreen"; const Stack = createNativeStackNavigator(); diff --git a/client-new/src/screens/auth/AccessScreen.tsx b/client-new/src/screens/auth/LoginScreen.tsx similarity index 83% rename from client-new/src/screens/auth/AccessScreen.tsx rename to client-new/src/screens/auth/LoginScreen.tsx index ef9487b..0113ce9 100644 --- a/client-new/src/screens/auth/AccessScreen.tsx +++ b/client-new/src/screens/auth/LoginScreen.tsx @@ -4,6 +4,9 @@ import { SafeAreaView } from "react-native-safe-area-context"; import { useAuth } from "../../contexts/AuthContext"; import { useState } from "react"; import ScreenWideInput from "../../components/reusable/ScreenWideInput"; +import { FontAwesome } from "@expo/vector-icons"; +import ScreenWideButton from "../../components/reusable/ScreenWideButton"; +import SquareButton from "../../components/reusable/SquareButton"; export default function AccessScreen() { const { user, createAccount, login, logout } = useAuth(); @@ -22,7 +25,7 @@ export default function AccessScreen() { return ( - + {/* - + */} - + {/* Login @@ -54,22 +57,27 @@ export default function AccessScreen() { > Logout - + */} + } onChangeText={(value) => setEmail(value)} value={email} /> } password={true} onChangeText={(value) => setPassword(value)} value={password} /> + diff --git a/client-new/src/screens/auth/SignUpScreen.tsx b/client-new/src/screens/auth/SignUpScreen.tsx new file mode 100644 index 0000000..3d84298 --- /dev/null +++ b/client-new/src/screens/auth/SignUpScreen.tsx @@ -0,0 +1,113 @@ +import { Button, Input, KeyboardAvoidingView, View } from "native-base"; +import { Text, TextInput, TouchableOpacity, StyleSheet } from "react-native"; +import { SafeAreaView } from "react-native-safe-area-context"; +import { useAuth } from "../../contexts/AuthContext"; +import { useState } from "react"; +import ScreenWideInput from "../../components/reusable/ScreenWideInput"; +import { FontAwesome } from "@expo/vector-icons"; +import ScreenWideButton from "../../components/reusable/ScreenWideButton"; +import SquareButton from "../../components/reusable/SquareButton"; + +export default function AccessScreen() { + const { user, createAccount, login, logout } = useAuth(); + + const [fullName, setFullName] = useState(""); + const [email, setEmail] = useState(""); + const [password, setPassword] = useState(""); + + const signUp = () => { + createAccount(email, password); + }; + + const signIn = () => { + login(email, password); + }; + + + + + + return ( + + + { + + + setFullName(value)} + value={fullName} + /> + + + } + onChangeText={(value) => setEmail(value)} + value={email} + /> + } + password={true} + onChangeText={(value) => setPassword(value)} + value={password} + /> + + + + + ); +} + +const styles = StyleSheet.create({ + container: { + flex: 1, + justifyContent: "center", + alignItems: "center", + }, + inputContainer: { + width: "80%", + }, + input: { + backgroundColor: "white", + paddingHorizontal: 15, + paddingVertical: 10, + borderRadius: 10, + marginTop: 5, + }, + buttonContainer: { + width: "60%", + justifyContent: "center", + alignItems: "center", + marginTop: 40, + }, + button: { + backgroundColor: "#0782F9", + width: "100%", + padding: 15, + borderRadius: 10, + alignItems: "center", + }, + buttonOutline: { + backgroundColor: "white", + marginTop: 5, + borderColor: "#0782F9", + borderWidth: 2, + }, + buttonText: { + color: "white", + fontWeight: "700", + fontSize: 16, + }, + buttonOutlineText: { + color: "#0782F9", + fontWeight: "700", + fontSize: 16, + }, +}); diff --git a/client-new/yarn.lock b/client-new/yarn.lock index d076ef3..d9c613d 100644 --- a/client-new/yarn.lock +++ b/client-new/yarn.lock @@ -7065,6 +7065,11 @@ react-freeze@^1.0.0: resolved "https://registry.yarnpkg.com/react-freeze/-/react-freeze-1.0.3.tgz#5e3ca90e682fed1d73a7cb50c2c7402b3e85618d" integrity sha512-ZnXwLQnGzrDpHBHiC56TXFXvmolPeMjTn1UOm610M4EXGzbEDR7oOIyS2ZiItgbs6eZc4oU/a0hpk8PrcKvv5g== +react-icons@^4.11.0: + version "4.11.0" + resolved "https://registry.yarnpkg.com/react-icons/-/react-icons-4.11.0.tgz#4b0e31c9bfc919608095cc429c4f1846f4d66c65" + integrity sha512-V+4khzYcE5EBk/BvcuYRq6V/osf11ODUM2J8hg2FDSswRrGvqiYUYPRy4OdrWaQOBj4NcpJfmHZLNaD+VH0TyA== + "react-is@^16.12.0 || ^17.0.0 || ^18.0.0", react-is@^18.0.0: version "18.2.0" resolved "https://registry.yarnpkg.com/react-is/-/react-is-18.2.0.tgz#199431eeaaa2e09f86427efbb4f1473edb47609b" diff --git a/yarn.lock b/yarn.lock new file mode 100644 index 0000000..fb57ccd --- /dev/null +++ b/yarn.lock @@ -0,0 +1,4 @@ +# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY. +# yarn lockfile v1 + + From 93fd7d9f9099db210e5a8c25465fbbd633c50a65 Mon Sep 17 00:00:00 2001 From: Aryan Kale Date: Mon, 16 Oct 2023 19:06:03 -0400 Subject: [PATCH 06/22] Fixed rounding and icons for reusable components --- client-new/package.json | 2 -- .../components/reusable/ScreenWideInput.tsx | 22 ++++++++++--------- .../src/components/reusable/SquareButton.tsx | 2 +- client-new/src/screens/auth/LoginScreen.tsx | 4 ++-- client-new/src/screens/auth/SignUpScreen.tsx | 7 ++---- client-new/yarn.lock | 5 ----- 6 files changed, 17 insertions(+), 25 deletions(-) diff --git a/client-new/package.json b/client-new/package.json index 1a7309c..80a621c 100644 --- a/client-new/package.json +++ b/client-new/package.json @@ -10,7 +10,6 @@ "ts:check": "tsc" }, "dependencies": { - "@expo/vector-icons": "^13.0.0", "@react-navigation/native": "^6.1.8", "@react-navigation/native-stack": "^6.9.14", "@types/react": "^18.2.28", @@ -23,7 +22,6 @@ "native-base": "^3.4.28", "react": "18.2.0", "react-dom": "^18.2.0", - "react-icons": "^4.11.0", "react-native": "0.72.5", "react-native-auth0": "^3.0.2", "react-native-responsive-screen": "^1.4.2", diff --git a/client-new/src/components/reusable/ScreenWideInput.tsx b/client-new/src/components/reusable/ScreenWideInput.tsx index 8ca7c91..6e3806e 100644 --- a/client-new/src/components/reusable/ScreenWideInput.tsx +++ b/client-new/src/components/reusable/ScreenWideInput.tsx @@ -1,17 +1,18 @@ -import { Input, FormControl, Container, Button, Text} from "native-base"; -import React, { ReactNode, useState } from "react"; +import React, { useState } from "react"; +import { Input, FormControl, Container, Button, Text, View} from "native-base"; import { widthPercentageToDP as w, heightPercentageToDP as h, } from "react-native-responsive-screen"; -import { FontAwesome } from "@expo/vector-icons"; +import Icon from 'react-native-vector-icons/FontAwesome'; + type ScreenWideInputProps = { title?: string; password?: boolean; placeholderText?: string; onChangeText: (value) => void; - icon?: ReactNode; + iconName?: string; value: string; }; @@ -20,9 +21,11 @@ export default function ScreenWideInput(props: ScreenWideInputProps) { const toggleShowPassword = () => setShowPassword(!showPassword); - const inputLeftElement = props.icon ? ( - props.icon - ) : undefined; + const inputLeftIcon = props.iconName ? ( + + + + ) : null; const inputRightElement = props.password ? ( ) : undefined; - return ( <> @@ -43,11 +45,11 @@ export default function ScreenWideInput(props: ScreenWideInputProps) { value={props.value} onChangeText={(value) => props.onChangeText(value)} placeholder={props.placeholderText} - InputLeftElement={inputLeftElement} + InputLeftElement={inputLeftIcon} InputRightElement={inputRightElement} rounded="full" /> ); -} +} \ No newline at end of file diff --git a/client-new/src/components/reusable/SquareButton.tsx b/client-new/src/components/reusable/SquareButton.tsx index 2e9e8c7..e1df104 100644 --- a/client-new/src/components/reusable/SquareButton.tsx +++ b/client-new/src/components/reusable/SquareButton.tsx @@ -9,7 +9,7 @@ export default function SquareButton(props: SquareButtonProps) { return ( ) diff --git a/client-new/src/screens/auth/LoginScreen.tsx b/client-new/src/screens/auth/LoginScreen.tsx index 0113ce9..17020ef 100644 --- a/client-new/src/screens/auth/LoginScreen.tsx +++ b/client-new/src/screens/auth/LoginScreen.tsx @@ -65,14 +65,14 @@ export default function AccessScreen() { } + iconName="envelope-o" onChangeText={(value) => setEmail(value)} value={email} /> } + iconName="lock" password={true} onChangeText={(value) => setPassword(value)} value={password} diff --git a/client-new/src/screens/auth/SignUpScreen.tsx b/client-new/src/screens/auth/SignUpScreen.tsx index 3d84298..1a0d129 100644 --- a/client-new/src/screens/auth/SignUpScreen.tsx +++ b/client-new/src/screens/auth/SignUpScreen.tsx @@ -23,14 +23,13 @@ export default function AccessScreen() { login(email, password); }; - + return ( - { setFullName(value)} value={fullName} /> - - - + ); } diff --git a/client-new/yarn.lock b/client-new/yarn.lock index d9c613d..d076ef3 100644 --- a/client-new/yarn.lock +++ b/client-new/yarn.lock @@ -7065,11 +7065,6 @@ react-freeze@^1.0.0: resolved "https://registry.yarnpkg.com/react-freeze/-/react-freeze-1.0.3.tgz#5e3ca90e682fed1d73a7cb50c2c7402b3e85618d" integrity sha512-ZnXwLQnGzrDpHBHiC56TXFXvmolPeMjTn1UOm610M4EXGzbEDR7oOIyS2ZiItgbs6eZc4oU/a0hpk8PrcKvv5g== -react-icons@^4.11.0: - version "4.11.0" - resolved "https://registry.yarnpkg.com/react-icons/-/react-icons-4.11.0.tgz#4b0e31c9bfc919608095cc429c4f1846f4d66c65" - integrity sha512-V+4khzYcE5EBk/BvcuYRq6V/osf11ODUM2J8hg2FDSswRrGvqiYUYPRy4OdrWaQOBj4NcpJfmHZLNaD+VH0TyA== - "react-is@^16.12.0 || ^17.0.0 || ^18.0.0", react-is@^18.0.0: version "18.2.0" resolved "https://registry.yarnpkg.com/react-is/-/react-is-18.2.0.tgz#199431eeaaa2e09f86427efbb4f1473edb47609b" From b89c878bcafe5c14ae4d65bf85f14a1cc19c7c34 Mon Sep 17 00:00:00 2001 From: Aryan Kale Date: Mon, 16 Oct 2023 19:06:48 -0400 Subject: [PATCH 07/22] Small update on an icon --- client-new/src/screens/auth/SignUpScreen.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/client-new/src/screens/auth/SignUpScreen.tsx b/client-new/src/screens/auth/SignUpScreen.tsx index 1a0d129..16d584f 100644 --- a/client-new/src/screens/auth/SignUpScreen.tsx +++ b/client-new/src/screens/auth/SignUpScreen.tsx @@ -43,14 +43,14 @@ export default function AccessScreen() { } + iconName="envelope-o" onChangeText={(value) => setEmail(value)} value={email} /> } + iconName="lock" password={true} onChangeText={(value) => setPassword(value)} value={password} From eaab69e4422197b8166fbe9651c112cd3b5a21cd Mon Sep 17 00:00:00 2001 From: Aryan Kale Date: Tue, 17 Oct 2023 22:41:03 -0400 Subject: [PATCH 08/22] Updated screens / components related to onboarding workflow --- client-new/src/components/LetsGo.tsx | 10 ++ client-new/src/components/reusable/Circle.tsx | 29 ++++ .../components/reusable/CircleProgressBar.tsx | 38 ++++++ .../components/reusable/CompaniesFooter.tsx | 28 ++++ .../reusable/HalfScreenWideButton.tsx | 32 +++++ .../components/reusable/LegacyWordmark.tsx | 10 ++ .../components/reusable/QuestionaireBox.tsx | 38 ++++++ .../components/reusable/ScreenWideButton.tsx | 49 +++---- .../components/reusable/ScreenWideInput.tsx | 32 +++-- .../src/components/reusable/SquareButton.tsx | 26 ++-- client-new/src/navigation/AuthStack.tsx | 31 +++-- .../src/screens/app/QuestionaireScreen.tsx | 20 +++ client-new/src/screens/auth/AccessScreen.tsx | 22 +++ client-new/src/screens/auth/LoginScreen.tsx | 113 ++++++++------- client-new/src/screens/auth/SignUpScreen.tsx | 129 ++++++++++++++---- .../src/screens/auth/TransitionScreen.tsx | 66 +++++++++ 16 files changed, 533 insertions(+), 140 deletions(-) create mode 100644 client-new/src/components/LetsGo.tsx create mode 100644 client-new/src/components/reusable/Circle.tsx create mode 100644 client-new/src/components/reusable/CircleProgressBar.tsx create mode 100644 client-new/src/components/reusable/CompaniesFooter.tsx create mode 100644 client-new/src/components/reusable/HalfScreenWideButton.tsx create mode 100644 client-new/src/components/reusable/LegacyWordmark.tsx create mode 100644 client-new/src/components/reusable/QuestionaireBox.tsx create mode 100644 client-new/src/screens/app/QuestionaireScreen.tsx create mode 100644 client-new/src/screens/auth/AccessScreen.tsx create mode 100644 client-new/src/screens/auth/TransitionScreen.tsx diff --git a/client-new/src/components/LetsGo.tsx b/client-new/src/components/LetsGo.tsx new file mode 100644 index 0000000..028839d --- /dev/null +++ b/client-new/src/components/LetsGo.tsx @@ -0,0 +1,10 @@ +import { Text, View } from "native-base"; +export default function LetsGo() { + return ( + <> + + Let's go! + + + ); +} diff --git a/client-new/src/components/reusable/Circle.tsx b/client-new/src/components/reusable/Circle.tsx new file mode 100644 index 0000000..92c5764 --- /dev/null +++ b/client-new/src/components/reusable/Circle.tsx @@ -0,0 +1,29 @@ +import { View, Text } from "native-base"; +import { border } from "native-base/lib/typescript/theme/styled-system"; +import { + widthPercentageToDP as w, + heightPercentageToDP as h, +} from "react-native-responsive-screen"; + +type CircleProps = { + color: string; + border?: boolean +}; + +export default function Circle(props: CircleProps) { + + const borderWidth = props.border ? 1 : 0 + + return ( + <> + + + ); +} diff --git a/client-new/src/components/reusable/CircleProgressBar.tsx b/client-new/src/components/reusable/CircleProgressBar.tsx new file mode 100644 index 0000000..3787485 --- /dev/null +++ b/client-new/src/components/reusable/CircleProgressBar.tsx @@ -0,0 +1,38 @@ +import { View } from "native-base"; +import Circle from "./Circle"; +import { + widthPercentageToDP as w, + heightPercentageToDP as h, +} from "react-native-responsive-screen"; + +type CircleProgressBarProps = { + totalCircles: number; + completedCircles: number; +}; + +export default function CircleProgressBar(props: CircleProgressBarProps) { + const circles = []; + + for (let i = 0; i < props.totalCircles; i++) { + if (i === 0 && props.completedCircles === 0) { + circles.push(); + } else if (i < props.completedCircles) { + circles.push(); + } else if (i === props.completedCircles) { + circles.push(); + } else { + circles.push(); + } + } + + return ( + + {circles} + + ); +} diff --git a/client-new/src/components/reusable/CompaniesFooter.tsx b/client-new/src/components/reusable/CompaniesFooter.tsx new file mode 100644 index 0000000..613a984 --- /dev/null +++ b/client-new/src/components/reusable/CompaniesFooter.tsx @@ -0,0 +1,28 @@ +import { Text, View } from "native-base"; +import { + widthPercentageToDP as w, + heightPercentageToDP as h, +} from "react-native-responsive-screen"; + +export default function CompaniesFooter() { + return ( + <> + + Company 1 + Company 2 + Company 3 + + + + See why these companies are partnered with Legacy + + + + ); +} diff --git a/client-new/src/components/reusable/HalfScreenWideButton.tsx b/client-new/src/components/reusable/HalfScreenWideButton.tsx new file mode 100644 index 0000000..9f905dc --- /dev/null +++ b/client-new/src/components/reusable/HalfScreenWideButton.tsx @@ -0,0 +1,32 @@ +import { Text, Button } from "native-base"; +import React from "react"; +import { + widthPercentageToDP as w, + heightPercentageToDP as h, +} from "react-native-responsive-screen"; + +type ScreenWideButtonProps = { + text: string; + textColor: string; + backgroundColor: string; + borderColor: string; + onClick?: (input) => any; +}; + +export default function HalfScreenWideButton(props: ScreenWideButtonProps) { + return ( + <> + + + ); +} diff --git a/client-new/src/components/reusable/LegacyWordmark.tsx b/client-new/src/components/reusable/LegacyWordmark.tsx new file mode 100644 index 0000000..9d2fa58 --- /dev/null +++ b/client-new/src/components/reusable/LegacyWordmark.tsx @@ -0,0 +1,10 @@ +import { Text, View } from "native-base"; +export default function LegacyWordmark() { + return ( + + + Legacy Wordmark + + + ); +} diff --git a/client-new/src/components/reusable/QuestionaireBox.tsx b/client-new/src/components/reusable/QuestionaireBox.tsx new file mode 100644 index 0000000..5256846 --- /dev/null +++ b/client-new/src/components/reusable/QuestionaireBox.tsx @@ -0,0 +1,38 @@ +import React from "react"; +import { View, Text } from "native-base"; +import { + widthPercentageToDP as w, + heightPercentageToDP as h, +} from "react-native-responsive-screen"; + +type QuestionaireBoxProps = { + text1: string; + text2: string; +}; + +export default function QuestionaireBox(props: QuestionaireBoxProps) { + return ( + + + + + {props.text1} + + {props.text2} + + + + ); +} diff --git a/client-new/src/components/reusable/ScreenWideButton.tsx b/client-new/src/components/reusable/ScreenWideButton.tsx index d379392..7d40597 100644 --- a/client-new/src/components/reusable/ScreenWideButton.tsx +++ b/client-new/src/components/reusable/ScreenWideButton.tsx @@ -1,39 +1,32 @@ -import { Input, FormControl, Box, Text, Button } from "native-base"; -import React, {useState } from "react"; +import { Text, Button } from "native-base"; +import React from "react"; import { - widthPercentageToDP as w, - heightPercentageToDP as h, - } from "react-native-responsive-screen"; - + widthPercentageToDP as w, + heightPercentageToDP as h, +} from "react-native-responsive-screen"; type ScreenWideButtonProps = { - text: string; - textColor: string; - backgroundColor: string; - onClick?: (input) => any; + text: string; + textColor: string; + backgroundColor: string; + borderColor: string; + onClick?: (input) => any; }; - - export default function ScreenWideButton(props: ScreenWideButtonProps) { - - const buttonStyle = { - backgroundColor: props.backgroundColor, - width: w("80%"), - height: h("5%"), - borderRadius: w("80%") / 2 - }; - - const textStyle = { - color: props.textColor, - }; - return ( <> - + ); } - diff --git a/client-new/src/components/reusable/ScreenWideInput.tsx b/client-new/src/components/reusable/ScreenWideInput.tsx index 6e3806e..9b34f15 100644 --- a/client-new/src/components/reusable/ScreenWideInput.tsx +++ b/client-new/src/components/reusable/ScreenWideInput.tsx @@ -1,11 +1,10 @@ import React, { useState } from "react"; -import { Input, FormControl, Container, Button, Text, View} from "native-base"; +import { Input, FormControl, Button, Text, View } from "native-base"; import { widthPercentageToDP as w, heightPercentageToDP as h, } from "react-native-responsive-screen"; -import Icon from 'react-native-vector-icons/FontAwesome'; - +import Icon from "react-native-vector-icons/FontAwesome"; type ScreenWideInputProps = { title?: string; @@ -22,34 +21,45 @@ export default function ScreenWideInput(props: ScreenWideInputProps) { const toggleShowPassword = () => setShowPassword(!showPassword); const inputLeftIcon = props.iconName ? ( - - + + ) : null; const inputRightElement = props.password ? ( - ) : undefined; return ( <> - + {props.title} props.onChangeText(value)} placeholder={props.placeholderText} InputLeftElement={inputLeftIcon} InputRightElement={inputRightElement} rounded="full" /> - + ); -} \ No newline at end of file +} diff --git a/client-new/src/components/reusable/SquareButton.tsx b/client-new/src/components/reusable/SquareButton.tsx index e1df104..2aaabf1 100644 --- a/client-new/src/components/reusable/SquareButton.tsx +++ b/client-new/src/components/reusable/SquareButton.tsx @@ -1,16 +1,22 @@ import { Button, Text } from "native-base"; type SquareButtonProps = { - title: string; - onClick?: (input) => any; + title: string; + onClick?: (input) => any; }; export default function SquareButton(props: SquareButtonProps) { - return ( - - - ) - -} \ No newline at end of file + return ( + + ); +} diff --git a/client-new/src/navigation/AuthStack.tsx b/client-new/src/navigation/AuthStack.tsx index 8413734..1d3c1a4 100644 --- a/client-new/src/navigation/AuthStack.tsx +++ b/client-new/src/navigation/AuthStack.tsx @@ -1,16 +1,25 @@ import { createNativeStackNavigator } from "@react-navigation/native-stack"; -import AccessScreen from "../screens/auth/LoginScreen"; +import LoginScreen from "../screens/auth/LoginScreen"; +import SignUpScreen from "../screens/auth/SignUpScreen"; +import QuestionaireScreen from "../screens/app/QuestionaireScreen"; +import AccessScreen from "../screens/auth/AccessScreen"; +import TransitionScreen from "../screens/auth/TransitionScreen"; const Stack = createNativeStackNavigator(); export default function AuthStack() { - return ( - - - - ); -} \ No newline at end of file + return ( + + + + + + + + ); +} diff --git a/client-new/src/screens/app/QuestionaireScreen.tsx b/client-new/src/screens/app/QuestionaireScreen.tsx new file mode 100644 index 0000000..612b210 --- /dev/null +++ b/client-new/src/screens/app/QuestionaireScreen.tsx @@ -0,0 +1,20 @@ +import { SafeAreaView } from "react-native-safe-area-context"; +import QuestionaireBox from "../../components/reusable/QuestionaireBox"; +import { KeyboardAvoidingView, View } from "native-base"; +import CircleProgressBar from "../../components/reusable/CircleProgressBar"; + +export default function QuestionaireScreen() { + return ( + + + + + + + + + ); +} diff --git a/client-new/src/screens/auth/AccessScreen.tsx b/client-new/src/screens/auth/AccessScreen.tsx new file mode 100644 index 0000000..d1da7a7 --- /dev/null +++ b/client-new/src/screens/auth/AccessScreen.tsx @@ -0,0 +1,22 @@ +import { Text } from "react-native"; +import { SafeAreaView } from "react-native-safe-area-context"; +import ScreenWideButton from "../../components/reusable/ScreenWideButton"; + +export default function AccessScreen({ route, navigation }) { + + const toSignUp = () => { + navigation.navigate("Sign Up Screen") + } + + const toLogin = () => { + navigation.navigate("Login Screen") + } + + return ( + More Life. + Less Stress. + Lorem ipsum dolor sit amet consectetur. Congue habitant fermentum eget ornare sit. + + + ) +} \ No newline at end of file diff --git a/client-new/src/screens/auth/LoginScreen.tsx b/client-new/src/screens/auth/LoginScreen.tsx index 17020ef..80742bd 100644 --- a/client-new/src/screens/auth/LoginScreen.tsx +++ b/client-new/src/screens/auth/LoginScreen.tsx @@ -1,14 +1,20 @@ -import { Button, Input, KeyboardAvoidingView, View } from "native-base"; -import { Text, TextInput, TouchableOpacity, StyleSheet } from "react-native"; +import { KeyboardAvoidingView, View } from "native-base"; +import { StyleSheet } from "react-native"; import { SafeAreaView } from "react-native-safe-area-context"; import { useAuth } from "../../contexts/AuthContext"; import { useState } from "react"; import ScreenWideInput from "../../components/reusable/ScreenWideInput"; -import { FontAwesome } from "@expo/vector-icons"; -import ScreenWideButton from "../../components/reusable/ScreenWideButton"; +import ScreenWideButton from "../../components/reusable/HalfScreenWideButton"; import SquareButton from "../../components/reusable/SquareButton"; +import CompaniesFooter from "../../components/reusable/CompaniesFooter"; +import { + widthPercentageToDP as w, + heightPercentageToDP as h, +} from "react-native-responsive-screen"; +import LegacyWordmark from "../../components/reusable/LegacyWordmark"; +import LetsGo from "../../components/LetsGo"; -export default function AccessScreen() { +export default function LoginScreen({ route, navigation }) { const { user, createAccount, login, logout } = useAuth(); const [email, setEmail] = useState(""); @@ -22,46 +28,26 @@ export default function AccessScreen() { login(email, password); }; + const switchToSignUp = () => { + navigation.navigate("Sign Up Screen"); + }; + return ( - - {/* - setEmail(text)} - style={styles.input} - /> - setPassword(text)} - style={styles.input} - secureTextEntry - /> - */} - - {/* - - Login - - - Register - - - Logout - - */} - - + + + + + + + + + setEmail(value)} value={email} /> - setPassword(value)} - value={password} - /> - + + setPassword(value)} + value={password} + /> + + + + + + + + diff --git a/client-new/src/screens/auth/SignUpScreen.tsx b/client-new/src/screens/auth/SignUpScreen.tsx index 16d584f..84f835c 100644 --- a/client-new/src/screens/auth/SignUpScreen.tsx +++ b/client-new/src/screens/auth/SignUpScreen.tsx @@ -5,10 +5,17 @@ import { useAuth } from "../../contexts/AuthContext"; import { useState } from "react"; import ScreenWideInput from "../../components/reusable/ScreenWideInput"; import { FontAwesome } from "@expo/vector-icons"; -import ScreenWideButton from "../../components/reusable/ScreenWideButton"; +import ScreenWideButton from "../../components/reusable/HalfScreenWideButton"; import SquareButton from "../../components/reusable/SquareButton"; +import CompaniesFooter from "../../components/reusable/CompaniesFooter"; +import { + widthPercentageToDP as w, + heightPercentageToDP as h, +} from "react-native-responsive-screen"; +import LegacyWordmark from "../../components/reusable/LegacyWordmark"; +import LetsGo from "../../components/LetsGo"; -export default function AccessScreen() { +export default function SignUpScreen({ route, navigation }) { const { user, createAccount, login, logout } = useAuth(); const [fullName, setFullName] = useState(""); @@ -23,42 +30,108 @@ export default function AccessScreen() { login(email, password); }; - - - + const switchToLogin = () => { + navigation.navigate("Login Screen"); + }; return ( - - - - + + + + + + + + + setFullName(value)} value={fullName} /> - setEmail(value)} - value={email} - /> - setPassword(value)} - value={password} - /> - + + setEmail(value)} + value={email} + /> + + + setPassword(value)} + value={password} + /> + + + + + + + + - + + // + // + // + // + // setFullName(value)} + // value={fullName} + // /> + // setEmail(value)} + // value={email} + // /> + // setPassword(value)} + // value={password} + // /> + // + // + // + // ); } diff --git a/client-new/src/screens/auth/TransitionScreen.tsx b/client-new/src/screens/auth/TransitionScreen.tsx new file mode 100644 index 0000000..bdcb195 --- /dev/null +++ b/client-new/src/screens/auth/TransitionScreen.tsx @@ -0,0 +1,66 @@ +import { KeyboardAvoidingView, View, Text, Divider, Button } from "native-base"; +import { SafeAreaView } from "react-native-safe-area-context"; +import CircleProgressBar from "../../components/reusable/CircleProgressBar"; +import LegacyWordmark from "../../components/reusable/LegacyWordmark"; +import { + widthPercentageToDP as w, + heightPercentageToDP as h, +} from "react-native-responsive-screen"; +import Icon from "react-native-vector-icons/MaterialCommunityIcons"; + +export default function TransitionScreen() { + return ( + + + + + + + + + + + {" "} + Welcome Max!{" "} + + + + + + Our mission is to mission, your mission here, your mission statement + here + + + {" "} + We have a few questions before we going.{" "} + + + + + + ); +} From ffab8204fa6a36cf6462fe2b27c44ed2dd047588 Mon Sep 17 00:00:00 2001 From: Aryan Kale Date: Tue, 17 Oct 2023 22:42:09 -0400 Subject: [PATCH 09/22] Moved files around --- client-new/src/components/{ => reusable}/LetsGo.tsx | 0 client-new/src/navigation/AuthStack.tsx | 2 +- client-new/src/screens/auth/LoginScreen.tsx | 2 +- client-new/src/screens/{app => auth}/QuestionaireScreen.tsx | 0 client-new/src/screens/auth/SignUpScreen.tsx | 2 +- 5 files changed, 3 insertions(+), 3 deletions(-) rename client-new/src/components/{ => reusable}/LetsGo.tsx (100%) rename client-new/src/screens/{app => auth}/QuestionaireScreen.tsx (100%) diff --git a/client-new/src/components/LetsGo.tsx b/client-new/src/components/reusable/LetsGo.tsx similarity index 100% rename from client-new/src/components/LetsGo.tsx rename to client-new/src/components/reusable/LetsGo.tsx diff --git a/client-new/src/navigation/AuthStack.tsx b/client-new/src/navigation/AuthStack.tsx index 1d3c1a4..87a8947 100644 --- a/client-new/src/navigation/AuthStack.tsx +++ b/client-new/src/navigation/AuthStack.tsx @@ -1,7 +1,7 @@ import { createNativeStackNavigator } from "@react-navigation/native-stack"; import LoginScreen from "../screens/auth/LoginScreen"; import SignUpScreen from "../screens/auth/SignUpScreen"; -import QuestionaireScreen from "../screens/app/QuestionaireScreen"; +import QuestionaireScreen from "../screens/auth/QuestionaireScreen"; import AccessScreen from "../screens/auth/AccessScreen"; import TransitionScreen from "../screens/auth/TransitionScreen"; diff --git a/client-new/src/screens/auth/LoginScreen.tsx b/client-new/src/screens/auth/LoginScreen.tsx index 80742bd..0f30b32 100644 --- a/client-new/src/screens/auth/LoginScreen.tsx +++ b/client-new/src/screens/auth/LoginScreen.tsx @@ -12,7 +12,7 @@ import { heightPercentageToDP as h, } from "react-native-responsive-screen"; import LegacyWordmark from "../../components/reusable/LegacyWordmark"; -import LetsGo from "../../components/LetsGo"; +import LetsGo from "../../components/reusable/LetsGo"; export default function LoginScreen({ route, navigation }) { const { user, createAccount, login, logout } = useAuth(); diff --git a/client-new/src/screens/app/QuestionaireScreen.tsx b/client-new/src/screens/auth/QuestionaireScreen.tsx similarity index 100% rename from client-new/src/screens/app/QuestionaireScreen.tsx rename to client-new/src/screens/auth/QuestionaireScreen.tsx diff --git a/client-new/src/screens/auth/SignUpScreen.tsx b/client-new/src/screens/auth/SignUpScreen.tsx index 84f835c..be358dd 100644 --- a/client-new/src/screens/auth/SignUpScreen.tsx +++ b/client-new/src/screens/auth/SignUpScreen.tsx @@ -13,7 +13,7 @@ import { heightPercentageToDP as h, } from "react-native-responsive-screen"; import LegacyWordmark from "../../components/reusable/LegacyWordmark"; -import LetsGo from "../../components/LetsGo"; +import LetsGo from "../../components/reusable/LetsGo"; export default function SignUpScreen({ route, navigation }) { const { user, createAccount, login, logout } = useAuth(); From 1e5c91a36e9de5459935cb0db7a2075f385251e8 Mon Sep 17 00:00:00 2001 From: Aryan Kale Date: Wed, 18 Oct 2023 10:26:09 -0400 Subject: [PATCH 10/22] Finished all but persona screen --- .../src/components/reusable/BoxesAndBar.tsx | 51 ++++++++++++++ .../components/reusable/QuestionaireBox.tsx | 42 +++++++----- .../components/reusable/ScreenWideButton.tsx | 2 +- client-new/src/navigation/AuthStack.tsx | 18 +++-- client-new/src/screens/auth/LoginScreen.tsx | 2 +- .../src/screens/auth/QuestionaireScreen.tsx | 57 ++++++++++++++-- .../screens/auth/QuizSectionIntroScreen.tsx | 66 +++++++++++++++++++ client-new/src/screens/auth/SignUpScreen.tsx | 7 +- ...nScreen.tsx => SignUpTransitionScreen.tsx} | 53 +++++++-------- 9 files changed, 240 insertions(+), 58 deletions(-) create mode 100644 client-new/src/components/reusable/BoxesAndBar.tsx create mode 100644 client-new/src/screens/auth/QuizSectionIntroScreen.tsx rename client-new/src/screens/auth/{TransitionScreen.tsx => SignUpTransitionScreen.tsx} (60%) diff --git a/client-new/src/components/reusable/BoxesAndBar.tsx b/client-new/src/components/reusable/BoxesAndBar.tsx new file mode 100644 index 0000000..8054a41 --- /dev/null +++ b/client-new/src/components/reusable/BoxesAndBar.tsx @@ -0,0 +1,51 @@ +import { Divider, View } from "native-base"; +import { + widthPercentageToDP as w, + heightPercentageToDP as h, +} from "react-native-responsive-screen"; + +export default function BoxesAndBars() { + const bigCircle = ( + + ); + const smallCircle = ( + + ); + + const divider = ; + + return ( + <> + + {bigCircle} + {divider} + {smallCircle} + {divider} + {smallCircle} + {divider} + {smallCircle} + {divider} + {bigCircle} + + + ); +} diff --git a/client-new/src/components/reusable/QuestionaireBox.tsx b/client-new/src/components/reusable/QuestionaireBox.tsx index 5256846..4590873 100644 --- a/client-new/src/components/reusable/QuestionaireBox.tsx +++ b/client-new/src/components/reusable/QuestionaireBox.tsx @@ -4,6 +4,7 @@ import { widthPercentageToDP as w, heightPercentageToDP as h, } from "react-native-responsive-screen"; +import BoxesAndBars from "./BoxesAndBar"; type QuestionaireBoxProps = { text1: string; @@ -13,26 +14,35 @@ type QuestionaireBoxProps = { export default function QuestionaireBox(props: QuestionaireBoxProps) { return ( - - - - {props.text1} - - {props.text2} - + + + {props.text1} + + + {props.text2} + + + + ); } diff --git a/client-new/src/components/reusable/ScreenWideButton.tsx b/client-new/src/components/reusable/ScreenWideButton.tsx index 7d40597..65aef93 100644 --- a/client-new/src/components/reusable/ScreenWideButton.tsx +++ b/client-new/src/components/reusable/ScreenWideButton.tsx @@ -25,7 +25,7 @@ export default function ScreenWideButton(props: ScreenWideButtonProps) { borderColor={props.borderColor} borderWidth={1} > - {props.text} + {props.text} ); diff --git a/client-new/src/navigation/AuthStack.tsx b/client-new/src/navigation/AuthStack.tsx index 87a8947..a38620f 100644 --- a/client-new/src/navigation/AuthStack.tsx +++ b/client-new/src/navigation/AuthStack.tsx @@ -3,23 +3,31 @@ import LoginScreen from "../screens/auth/LoginScreen"; import SignUpScreen from "../screens/auth/SignUpScreen"; import QuestionaireScreen from "../screens/auth/QuestionaireScreen"; import AccessScreen from "../screens/auth/AccessScreen"; -import TransitionScreen from "../screens/auth/TransitionScreen"; +import SignUpTransitionScreen from "../screens/auth/SignUpTransitionScreen"; +import QuizSectionIntroScreen from "../screens/auth/QuizSectionIntroScreen"; const Stack = createNativeStackNavigator(); export default function AuthStack() { return ( - + - - + + + ); } diff --git a/client-new/src/screens/auth/LoginScreen.tsx b/client-new/src/screens/auth/LoginScreen.tsx index 0f30b32..3eb71c1 100644 --- a/client-new/src/screens/auth/LoginScreen.tsx +++ b/client-new/src/screens/auth/LoginScreen.tsx @@ -55,7 +55,7 @@ export default function LoginScreen({ route, navigation }) { onChangeText={(value) => setEmail(value)} value={email} /> - + - + + + + + + - + + + + + + + + + + ); diff --git a/client-new/src/screens/auth/QuizSectionIntroScreen.tsx b/client-new/src/screens/auth/QuizSectionIntroScreen.tsx new file mode 100644 index 0000000..c27e867 --- /dev/null +++ b/client-new/src/screens/auth/QuizSectionIntroScreen.tsx @@ -0,0 +1,66 @@ +import { KeyboardAvoidingView, View, Text, Divider, Button } from "native-base"; +import { SafeAreaView } from "react-native-safe-area-context"; +import CircleProgressBar from "../../components/reusable/CircleProgressBar"; +import LegacyWordmark from "../../components/reusable/LegacyWordmark"; +import { + widthPercentageToDP as w, + heightPercentageToDP as h, +} from "react-native-responsive-screen"; +import Icon from "react-native-vector-icons/MaterialCommunityIcons"; + +export default function QuizSectionIntroScreen() { + return ( + + + + + + + + + + + Quiz Section Title + + + + + + + Section description here, section purpose and outline here + + + Lorem ipsum dolor sit amet consectetur. Rhoncus viverra adipiscing + cursus amet viverra adipiscing cursus amet + + + + + + + ); +} diff --git a/client-new/src/screens/auth/SignUpScreen.tsx b/client-new/src/screens/auth/SignUpScreen.tsx index be358dd..9e9a16a 100644 --- a/client-new/src/screens/auth/SignUpScreen.tsx +++ b/client-new/src/screens/auth/SignUpScreen.tsx @@ -1,10 +1,9 @@ -import { Button, Input, KeyboardAvoidingView, View } from "native-base"; -import { Text, TextInput, TouchableOpacity, StyleSheet } from "react-native"; +import { KeyboardAvoidingView, View } from "native-base"; +import { StyleSheet } from "react-native"; import { SafeAreaView } from "react-native-safe-area-context"; import { useAuth } from "../../contexts/AuthContext"; import { useState } from "react"; import ScreenWideInput from "../../components/reusable/ScreenWideInput"; -import { FontAwesome } from "@expo/vector-icons"; import ScreenWideButton from "../../components/reusable/HalfScreenWideButton"; import SquareButton from "../../components/reusable/SquareButton"; import CompaniesFooter from "../../components/reusable/CompaniesFooter"; @@ -66,7 +65,7 @@ export default function SignUpScreen({ route, navigation }) { value={email} /> - + - + @@ -26,34 +26,35 @@ export default function TransitionScreen() { paddingTop={h("4%")} paddingBottom={h("5%")} > - - {" "} - Welcome Max!{" "} + + Welcome Max! - - Our mission is to mission, your mission here, your mission statement - here - - - {" "} - We have a few questions before we going.{" "} - + + + Our mission is to mission, your mission here, your mission statement + here + + + {" "} + We have a few questions before we going.{" "} + + ); } diff --git a/client-new/src/screens/auth/AccessScreen.tsx b/client-new/src/screens/auth/AccessScreen.tsx index 9370975..79df79d 100644 --- a/client-new/src/screens/auth/AccessScreen.tsx +++ b/client-new/src/screens/auth/AccessScreen.tsx @@ -53,6 +53,7 @@ export default function AccessScreen({ route, navigation }) { textColor={"#FFFFFF"} backgroundColor={"#8F8F8F"} borderColor={"#8F8F8F"} + onClick={toSignUp} /> @@ -62,6 +63,7 @@ export default function AccessScreen({ route, navigation }) { textColor={"#000000"} backgroundColor={"#FFFFFF"} borderColor={"#D9D9D9"} + onClick={toLogin} /> diff --git a/client-new/src/screens/auth/LandingScreen.tsx b/client-new/src/screens/auth/LandingScreen.tsx index 484dc21..a05d715 100644 --- a/client-new/src/screens/auth/LandingScreen.tsx +++ b/client-new/src/screens/auth/LandingScreen.tsx @@ -5,7 +5,7 @@ import { heightPercentageToDP as h, } from "react-native-responsive-screen"; -export default function LandingScreen() { +export default function LandingScreen({ route, navigation }) { return ( diff --git a/client-new/src/screens/auth/LoginScreen.tsx b/client-new/src/screens/auth/LoginScreen.tsx index 3eb71c1..3784676 100644 --- a/client-new/src/screens/auth/LoginScreen.tsx +++ b/client-new/src/screens/auth/LoginScreen.tsx @@ -73,7 +73,7 @@ export default function LoginScreen({ route, navigation }) { > @@ -82,6 +82,7 @@ export default function LoginScreen({ route, navigation }) { textColor="#FFFFFF" backgroundColor="#8F8F8F" borderColor="#8F8F8F" + onClick={signIn} /> diff --git a/client-new/src/screens/auth/PersonaScreen.tsx b/client-new/src/screens/auth/PersonaScreen.tsx index ed1f91b..c5efd2c 100644 --- a/client-new/src/screens/auth/PersonaScreen.tsx +++ b/client-new/src/screens/auth/PersonaScreen.tsx @@ -7,7 +7,7 @@ import { } from "react-native-responsive-screen"; import ScreenWideButton from "../../components/reusable/ScreenWideButton"; -export default function PersonaScreen() { +export default function PersonaScreen({ route, navigation }) { return ( diff --git a/client-new/src/screens/auth/QuestionaireScreen.tsx b/client-new/src/screens/auth/QuestionaireScreen.tsx index b3daee3..4682b0b 100644 --- a/client-new/src/screens/auth/QuestionaireScreen.tsx +++ b/client-new/src/screens/auth/QuestionaireScreen.tsx @@ -10,7 +10,9 @@ import { } from "react-native-responsive-screen"; import ScreenWideButton from "../../components/reusable/ScreenWideButton"; -export default function QuestionaireScreen() { +export default function QuestionaireScreen({ route, navigation }) { + // TODO: Uncomment this and abstract this screen + //const { props } = route.params; return ( diff --git a/client-new/src/screens/auth/QuizSectionIntroScreen.tsx b/client-new/src/screens/auth/QuizSectionIntroScreen.tsx index c27e867..15df8ba 100644 --- a/client-new/src/screens/auth/QuizSectionIntroScreen.tsx +++ b/client-new/src/screens/auth/QuizSectionIntroScreen.tsx @@ -8,7 +8,9 @@ import { } from "react-native-responsive-screen"; import Icon from "react-native-vector-icons/MaterialCommunityIcons"; -export default function QuizSectionIntroScreen() { +export default function QuizSectionIntroScreen({ route, navigation }) { + // TODO: Uncomment this and abstract this screen + //const { props } = route.params; return ( diff --git a/client-new/src/screens/auth/SignUpScreen.tsx b/client-new/src/screens/auth/SignUpScreen.tsx index 9e9a16a..79d208b 100644 --- a/client-new/src/screens/auth/SignUpScreen.tsx +++ b/client-new/src/screens/auth/SignUpScreen.tsx @@ -15,7 +15,7 @@ import LegacyWordmark from "../../components/reusable/LegacyWordmark"; import LetsGo from "../../components/reusable/LetsGo"; export default function SignUpScreen({ route, navigation }) { - const { user, createAccount, login, logout } = useAuth(); + const { user, createAccount, login} = useAuth(); const [fullName, setFullName] = useState(""); const [email, setEmail] = useState(""); @@ -92,6 +92,7 @@ export default function SignUpScreen({ route, navigation }) { textColor="#FFFFFF" backgroundColor="#8F8F8F" borderColor="#8F8F8F" + onClick={signUp} /> diff --git a/client-new/yarn.lock b/client-new/yarn.lock index d076ef3..bd2f3ec 100644 --- a/client-new/yarn.lock +++ b/client-new/yarn.lock @@ -4666,6 +4666,11 @@ expo-modules-core@1.5.11: compare-versions "^3.4.0" invariant "^2.2.4" +expo-secure-store@^12.5.0: + version "12.5.0" + resolved "https://registry.yarnpkg.com/expo-secure-store/-/expo-secure-store-12.5.0.tgz#f52456e15315d64d1e9000384d4a837eea9dbb1f" + integrity sha512-Ow2ei+SB1w4zPLxmOg2PVPf2i45Eii0T9KUaER5iRLJAMcBWN4nyGCxzESOoN3OrvxVadP0hAn6RVE1G3gdD+Q== + expo-status-bar@~1.6.0: version "1.6.0" resolved "https://registry.yarnpkg.com/expo-status-bar/-/expo-status-bar-1.6.0.tgz#e79ffdb9a84d2e0ec9a0dc7392d9ab364fefa9cf" From edff56f2461235db2baf1a7be7d52c9757ac2979 Mon Sep 17 00:00:00 2001 From: Aryan Kale Date: Wed, 18 Oct 2023 21:48:11 -0400 Subject: [PATCH 13/22] Updated flow --- client-new/src/contexts/OnboardingContext.tsx | 268 +++++++++++++++++- .../src/interfaces/IOnboardingFlowState.tsx | 21 +- client-new/src/navigation/AuthStack.tsx | 14 +- client-new/src/navigation/OnboardingStack.tsx | 2 + client-new/src/navigation/Router.tsx | 3 +- client-new/src/screens/auth/PersonaScreen.tsx | 17 ++ .../src/screens/auth/QuestionaireScreen.tsx | 26 +- .../screens/auth/QuizSectionIntroScreen.tsx | 30 +- client-new/src/screens/auth/SignUpScreen.tsx | 2 + .../screens/auth/SignUpTransitionScreen.tsx | 29 +- 10 files changed, 377 insertions(+), 35 deletions(-) diff --git a/client-new/src/contexts/OnboardingContext.tsx b/client-new/src/contexts/OnboardingContext.tsx index 440471a..7ab6a46 100644 --- a/client-new/src/contexts/OnboardingContext.tsx +++ b/client-new/src/contexts/OnboardingContext.tsx @@ -22,11 +22,265 @@ export const OnboardingProvider: React.FC = ({ children, }) => { const [page, setPage] = useState(0); - const [onboardingState, setOnboardingState] = useState( - {} - ); + const [onboardingState, setOnboardingState] = useState({ + worldviewQ1: undefined, + worldviewQ2: undefined, + worldviewQ3: undefined, + worldviewQ4: undefined, + worldviewQ5: undefined, + worldviewQ6: undefined, + emotionalPatternQ1: undefined, + emotionalPatternQ2: undefined, + emotionalPatternQ3: undefined, + workstyleQ1: undefined, + workstyleQ2: undefined, + workstyleQ3: undefined, + workstyleQ4: undefined, + socialInclinationQ1: undefined, + socialInclinationQ2: undefined, + socialInclinationQ3: undefined, + funnelActivitiesQ1: undefined, + funnelActivitiesQ2: undefined, + }); + + const onboardingFlow = [ + { + page: "Sign Up Transition Screen", + props: {}, + }, + { + page: "Questionaire Screen", + props: { + inputName: "worldviewQ1", + totalCircles: 6, + completedCircles: 0, + questionNumber: "One", + question: + 'When it comes to the future, are you the ultimate planner or more of a "let\'s see what happens" kind of person?', + }, + }, + { + page: "Questionaire Screen", + props: { + inputName: "worldviewQ2", + totalCircles: 6, + completedCircles: 1, + questionNumber: "Two", + question: + 'Would you describe yourself as more of a perfectionist or someone who is content with "good enough"?', + }, + }, + { + page: "Questionaire Screen", + props: { + inputName: "worldviewQ3", + totalCircles: 6, + completedCircles: 2, + questionNumber: "Three", + question: + "Are you a firm believer in self-improvement, no matter your age?", + }, + }, + { + page: "Questionaire Screen", + props: { + inputName: "worldviewQ4", + totalCircles: 6, + completedCircles: 3, + questionNumber: "Four", + question: + "How open are you to learning and stepping out of your comfort zone?", + }, + }, + { + page: "Questionaire Screen", + props: { + inputName: "worldviewQ5", + totalCircles: 6, + completedCircles: 4, + questionNumber: "Five", + question: + "Do you tend to focus on what you lack or on what you can provide for your loved ones?", + }, + }, + { + page: "Questionaire Screen", + props: { + inputName: "worldviewQ6", + totalCircles: 6, + completedCircles: 5, + questionNumber: "Six", + question: + "Do you take the initiative to plan ahead, or do you wait until circumstances force you to react?", + }, + }, + { + page: "Quiz Section Intro Screen", + props: { + totalCircles: 3, + }, + }, + { + page: "Questionaire Screen", + props: { + inputName: "emotionalPatternQ1", + totalCircles: 3, + completedCircles: 0, + questionNumber: "One", + question: "On a typical day, how anxious or calm do you tend to feel?", + }, + }, + { + page: "Questionaire Screen", + props: { + inputName: "emotionalPatternQ2", + totalCircles: 3, + completedCircles: 1, + questionNumber: "Two", + question: + "Is your glass usually half full, or do you tend to see it as half empty?", + }, + }, + { + page: "Questionaire Screen", + props: { + inputName: "emotionalPatternQ3", + totalCircles: 3, + completedCircles: 2, + questionNumber: "Three", + question: + "When making decisions, how often do you consider the emotional burden it might place on those close to you?", + }, + }, + { + page: "Quiz Section Intro Screen", + props: { + totalCircles: 4, + }, + }, + { + page: "Questionaire Screen", + props: { + inputName: "workstyleQ1", + totalCircles: 4, + completedCircles: 0, + questionNumber: "One", + question: + "Are you a laser-focused, 'I get things done' dynamo, or more of a 'why stick to one thing when I can multitask' explorer?", + }, + }, + { + page: "Questionaire Screen", + props: { + inputName: "workstyleQ2", + totalCircles: 4, + completedCircles: 1, + questionNumber: "Two", + question: + "Are you more internally motivated to accomplish tasks, or do you rely on external notifications and reminders?", + }, + }, + { + page: "Questionaire Screen", + props: { + inputName: "workstyleQ3", + totalCircles: 4, + completedCircles: 2, + questionNumber: "Three", + question: + "Do you prefer to tackle tasks iteratively over time, or do you prefer to do everything all at once?", + }, + }, + { + page: "Questionaire Screen", + props: { + inputName: "workstyleQ4", + totalCircles: 4, + completedCircles: 3, + questionNumber: "Four", + question: + "Do you prefer in-depth, detailed information when making important decisions, or do you gravitate towards concise, action-oriented advice?", + }, + }, + + { + page: "Quiz Section Intro Screen", + props: { + totalCircles: 3, + }, + }, - const onboardingFlow = {}; + { + page: "Questionaire Screen", + props: { + inputName: "socialInclinationQ1", + totalCircles: 3, + completedCircles: 0, + questionNumber: "One", + question: + "Is talking about death as easy as chatting about the weather, or do you tend to avoid the topic?", + }, + }, + { + page: "Questionaire Screen", + props: { + inputName: "socialInclinationQ2", + totalCircles: 3, + completedCircles: 1, + questionNumber: "Two", + question: + "Are you the go-to person to help friends and family with tricky decisions, or do you prefer someone else to do the heavy lifting?", + }, + }, + { + page: "Questionaire Screen", + props: { + inputName: "socialInclinationQ3", + totalCircles: 3, + completedCircles: 2, + questionNumber: "Three", + question: + "Are you more inclined to focus on your issues, or do you often help others with theirs?", + }, + }, + + { + page: "Quiz Section Intro Screen", + props: { + totalCircles: 2, + }, + }, + { + page: "Questionaire Screen", + props: { + inputName: "funnelActivitiesQ1", + totalCircles: 2, + completedCircles: 0, + questionNumber: "One", + question: + "Are you a walking encyclopedia on end-of-life planning, or do you feel like you're navigating uncharted waters?", + }, + }, + { + page: "Questionaire Screen", + props: { + inputName: "funnelActivitiesQ2", + totalCircles: 2, + completedCircles: 1, + questionNumber: "Two", + question: + 'Is your end-of-life planning a "when I get around to it" affair, or are you sprinting towards getting it done?', + }, + }, + { + page: "Persona Screen", + props: {}, + }, + { + page: "Landing Screen", + props: {}, + }, + ]; const handleChange = (name: string, value: any) => { setOnboardingState((prevData) => ({ @@ -52,11 +306,11 @@ export const OnboardingProvider: React.FC = ({ }; export const useOnboarding = (): OnboardingContextData => { - const context = useContext(OnboardingContext); + const context = useContext(OnboardingContext); if (!context) { - throw new Error('useOnboarding must be used within an AuthProvider'); + throw new Error("useOnboarding must be used within an AuthProvider"); } return context; -} +}; diff --git a/client-new/src/interfaces/IOnboardingFlowState.tsx b/client-new/src/interfaces/IOnboardingFlowState.tsx index c4eae14..ca25a4a 100644 --- a/client-new/src/interfaces/IOnboardingFlowState.tsx +++ b/client-new/src/interfaces/IOnboardingFlowState.tsx @@ -1,3 +1,20 @@ export interface IOnboardingFlowState { - -} \ No newline at end of file + worldviewQ1: number; + worldviewQ2: number; + worldviewQ3: number; + worldviewQ4: number; + worldviewQ5: number; + worldviewQ6: number; + emotionalPatternQ1: number; + emotionalPatternQ2: number; + emotionalPatternQ3: number; + workstyleQ1: number; + workstyleQ2: number; + workstyleQ3: number; + workstyleQ4: number; + socialInclinationQ1: number; + socialInclinationQ2: number; + socialInclinationQ3: number; + funnelActivitiesQ1: number; + funnelActivitiesQ2: number; +} diff --git a/client-new/src/navigation/AuthStack.tsx b/client-new/src/navigation/AuthStack.tsx index ab05322..fce8b0b 100644 --- a/client-new/src/navigation/AuthStack.tsx +++ b/client-new/src/navigation/AuthStack.tsx @@ -22,17 +22,7 @@ export default function AuthStack() { - - - - - - + + ); } diff --git a/client-new/src/navigation/OnboardingStack.tsx b/client-new/src/navigation/OnboardingStack.tsx index 7524c6f..213b977 100644 --- a/client-new/src/navigation/OnboardingStack.tsx +++ b/client-new/src/navigation/OnboardingStack.tsx @@ -12,8 +12,10 @@ export default function OnboardingStack() { return ( - {user ? : } + {false ? : } } \ No newline at end of file diff --git a/client-new/src/screens/auth/PersonaScreen.tsx b/client-new/src/screens/auth/PersonaScreen.tsx index c5efd2c..1314ed5 100644 --- a/client-new/src/screens/auth/PersonaScreen.tsx +++ b/client-new/src/screens/auth/PersonaScreen.tsx @@ -6,8 +6,24 @@ import { heightPercentageToDP as h, } from "react-native-responsive-screen"; import ScreenWideButton from "../../components/reusable/ScreenWideButton"; +import { useOnboarding } from "../../contexts/OnboardingContext"; export default function PersonaScreen({ route, navigation }) { + const { + page, + setPage, + onboardingState, + setOnboardingState, + onboardingFlow, + handleChange, + } = useOnboarding(); + + const next = async () => { + const nextPage = onboardingFlow[page + 1]; + setPage(page + 1); + navigation.push(nextPage.page, { props: nextPage.props }); + }; + return ( @@ -70,6 +86,7 @@ export default function PersonaScreen({ route, navigation }) { textColor={"#FFFFFF"} backgroundColor={"#8F8F8F"} borderColor={"#8F8F8F"} + onClick={next} /> diff --git a/client-new/src/screens/auth/QuestionaireScreen.tsx b/client-new/src/screens/auth/QuestionaireScreen.tsx index 4682b0b..518db28 100644 --- a/client-new/src/screens/auth/QuestionaireScreen.tsx +++ b/client-new/src/screens/auth/QuestionaireScreen.tsx @@ -9,10 +9,24 @@ import { heightPercentageToDP as h, } from "react-native-responsive-screen"; import ScreenWideButton from "../../components/reusable/ScreenWideButton"; +import { useOnboarding } from "../../contexts/OnboardingContext"; export default function QuestionaireScreen({ route, navigation }) { - // TODO: Uncomment this and abstract this screen - //const { props } = route.params; + const {page, setPage, onboardingState, setOnboardingState, onboardingFlow, handleChange} = useOnboarding(); + const { props } = route.params; + + const back = async () => { + const prevPage = onboardingFlow[page - 1]; + setPage(page - 1); + navigation.pop(); + }; + + const next = async () => { + const nextPage = onboardingFlow[page + 1]; + setPage(page + 1); + navigation.push(nextPage.page, { props: nextPage.props }); + }; + return ( @@ -30,7 +44,7 @@ export default function QuestionaireScreen({ route, navigation }) { - + @@ -51,6 +65,7 @@ export default function QuestionaireScreen({ route, navigation }) { textColor={"#FFFFFF"} backgroundColor={"#8F8F8F"} borderColor={"#8F8F8F"} + onClick={next} /> @@ -60,6 +75,7 @@ export default function QuestionaireScreen({ route, navigation }) { textColor={"#000000"} backgroundColor={"#FFFFFF"} borderColor={"#D9D9D9"} + onClick={back} /> diff --git a/client-new/src/screens/auth/QuizSectionIntroScreen.tsx b/client-new/src/screens/auth/QuizSectionIntroScreen.tsx index 15df8ba..94d206a 100644 --- a/client-new/src/screens/auth/QuizSectionIntroScreen.tsx +++ b/client-new/src/screens/auth/QuizSectionIntroScreen.tsx @@ -7,16 +7,33 @@ import { heightPercentageToDP as h, } from "react-native-responsive-screen"; import Icon from "react-native-vector-icons/MaterialCommunityIcons"; +import { useOnboarding } from "../../contexts/OnboardingContext"; export default function QuizSectionIntroScreen({ route, navigation }) { - // TODO: Uncomment this and abstract this screen - //const { props } = route.params; + const { + page, + setPage, + onboardingState, + setOnboardingState, + onboardingFlow, + handleChange, + } = useOnboarding(); + + const next = async () => { + const nextPage = onboardingFlow[page + 1]; + setPage(page + 1); + navigation.push(nextPage.page, { props: nextPage.props }); + }; + const { props } = route.params; return ( - + @@ -57,7 +74,12 @@ export default function QuizSectionIntroScreen({ route, navigation }) { - - + <> + + + + + + + + Hello Amanda! + + + + + + + Your Journey + + + See all + + + + + {testData.map((item, index) => ( + + + + ))} + + + + + + ); } + +const Card = (props) => { + return ( + + + + {props.title} + + + {props.description} + + + + + + + + {props.progress}% + + + + ); +};