From 8819593ed285fd2be60787d514d2959db869b16c Mon Sep 17 00:00:00 2001 From: jjstnlee Date: Thu, 7 Mar 2024 20:50:31 -0800 Subject: [PATCH 01/16] Added birthday boxand link for skip button on onboarding --- .vscode/settings.json | 7 +++ src/app/auth/onboarding/index.tsx | 59 +++++++++++++------ src/app/auth/onboarding/styles.tsx | 12 ++++ .../UserStringInput/UserStringInput.tsx | 2 +- src/components/UserStringInput/styles.tsx | 1 + 5 files changed, 62 insertions(+), 19 deletions(-) create mode 100644 .vscode/settings.json diff --git a/.vscode/settings.json b/.vscode/settings.json new file mode 100644 index 00000000..46d5ce93 --- /dev/null +++ b/.vscode/settings.json @@ -0,0 +1,7 @@ +{ + "editor.defaultFormatter": "esbenp.prettier-vscode", + "editor.codeActionsOnSave": { + "source.formatDocument": "explicit", + "source.fixAll.eslint": "explicit" + } +} diff --git a/src/app/auth/onboarding/index.tsx b/src/app/auth/onboarding/index.tsx index bfc85fb8..a9b9e481 100644 --- a/src/app/auth/onboarding/index.tsx +++ b/src/app/auth/onboarding/index.tsx @@ -1,5 +1,5 @@ import DateTimePicker from '@react-native-community/datetimepicker'; -import { Redirect, router } from 'expo-router'; +import { Link, Redirect, router } from 'expo-router'; import { useState, useEffect } from 'react'; import { Alert, ScrollView, Platform, Text, View } from 'react-native'; import { Icon } from 'react-native-elements'; @@ -7,6 +7,8 @@ import { Icon } from 'react-native-elements'; import styles from './styles'; import StyledButton from '../../../components/StyledButton/StyledButton'; import UserSelectorInput from '../../../components/UserSelectorInput/UserSelectorInput'; +import UserStringInput from '../../../components/UserStringInput/UserStringInput'; +import colors from '../../../styles/colors'; import globalStyles from '../../../styles/globalStyles'; import { useSession } from '../../../utils/AuthContext'; import supabase from '../../../utils/supabase'; @@ -19,7 +21,7 @@ function OnboardingScreen() { const [username, setUsername] = useState(''); const [lastName, setLastName] = useState(''); const [pronouns, setPronouns] = useState(''); - const [birthday, setBirthday] = useState(new Date()); + const [birthday, setBirthday] = useState(''); const [gender, setGender] = useState(''); const [raceEthnicity, setRaceEthnicity] = useState(''); const [showDatePicker, setShowDatePicker] = useState(Platform.OS === 'ios'); @@ -46,7 +48,7 @@ function OnboardingScreen() { setLastName(data.last_name || lastName); setUsername(data.username || username); setPronouns(data.pronouns || pronouns); - setBirthday(new Date(data.birthday) || birthday); + setBirthday(''); setGender(data.gender || gender); setRaceEthnicity(data.race_ethnicity || raceEthnicity); } @@ -111,9 +113,10 @@ function OnboardingScreen() { } }; - if (!session) { - return ; - } + // Make sure to bring this back !!!!! + // if (!session) { + // return ; + // } return ( @@ -130,6 +133,20 @@ function OnboardingScreen() { visible to other users on the app. + + + - {showDatePicker && ( + {/* Birthday Button Implementation */} + {/* {showDatePicker && ( - )} - - router.replace('/home')} - disabled={false} - /> + )} */} + + + + + + Skip For Now + + ); } diff --git a/src/app/auth/onboarding/styles.tsx b/src/app/auth/onboarding/styles.tsx index a868ff3b..9f24fe33 100644 --- a/src/app/auth/onboarding/styles.tsx +++ b/src/app/auth/onboarding/styles.tsx @@ -25,4 +25,16 @@ export default StyleSheet.create({ marginBottom: 16, width: 250, }, + bottomContainer: { + marginTop: 112, + }, + updateProfileButton: { + marginTop: 30, + marginBottom: 24, + }, + skipButton: { + flex: 1, + alignSelf: 'center', + color: colors.darkGrey, + }, }); diff --git a/src/components/UserStringInput/UserStringInput.tsx b/src/components/UserStringInput/UserStringInput.tsx index f7cd12d6..da5457a0 100644 --- a/src/components/UserStringInput/UserStringInput.tsx +++ b/src/components/UserStringInput/UserStringInput.tsx @@ -2,8 +2,8 @@ import { ReactNode } from 'react'; import { View, Text, TextInput } from 'react-native'; import styles from './styles'; -import globalStyles from '../../styles/globalStyles'; import colors from '../../styles/colors'; +import globalStyles from '../../styles/globalStyles'; type UserStringInputProps = { placeholder: string; diff --git a/src/components/UserStringInput/styles.tsx b/src/components/UserStringInput/styles.tsx index a11509d5..85ec0e85 100644 --- a/src/components/UserStringInput/styles.tsx +++ b/src/components/UserStringInput/styles.tsx @@ -8,6 +8,7 @@ export default StyleSheet.create({ container: { paddingRight: 10, marginTop: 8, + marginBottom: 16, flexDirection: 'row', alignItems: 'center', justifyContent: 'center', From 5f69ee79b05b764745664b6683d8125cc10190f5 Mon Sep 17 00:00:00 2001 From: jjstnlee Date: Thu, 7 Mar 2024 21:06:53 -0800 Subject: [PATCH 02/16] Revert "Added birthday boxand link for skip button on onboarding" This reverts commit 8fdf6d804782cc39f9deb904f296cf6296e68e31. Mistake yes --- .vscode/settings.json | 4 ++-- src/components/UserStringInput/UserStringInput.tsx | 2 +- src/components/UserStringInput/styles.tsx | 1 - 3 files changed, 3 insertions(+), 4 deletions(-) diff --git a/.vscode/settings.json b/.vscode/settings.json index 46d5ce93..a93e2d6f 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -1,7 +1,7 @@ { "editor.defaultFormatter": "esbenp.prettier-vscode", "editor.codeActionsOnSave": { - "source.formatDocument": "explicit", - "source.fixAll.eslint": "explicit" + "source.formatDocument": true, + "source.fixAll.eslint": true } } diff --git a/src/components/UserStringInput/UserStringInput.tsx b/src/components/UserStringInput/UserStringInput.tsx index da5457a0..f7cd12d6 100644 --- a/src/components/UserStringInput/UserStringInput.tsx +++ b/src/components/UserStringInput/UserStringInput.tsx @@ -2,8 +2,8 @@ import { ReactNode } from 'react'; import { View, Text, TextInput } from 'react-native'; import styles from './styles'; -import colors from '../../styles/colors'; import globalStyles from '../../styles/globalStyles'; +import colors from '../../styles/colors'; type UserStringInputProps = { placeholder: string; diff --git a/src/components/UserStringInput/styles.tsx b/src/components/UserStringInput/styles.tsx index 85ec0e85..a11509d5 100644 --- a/src/components/UserStringInput/styles.tsx +++ b/src/components/UserStringInput/styles.tsx @@ -8,7 +8,6 @@ export default StyleSheet.create({ container: { paddingRight: 10, marginTop: 8, - marginBottom: 16, flexDirection: 'row', alignItems: 'center', justifyContent: 'center', From 2102be33c188c4c8374bdec7630794d1a44eec23 Mon Sep 17 00:00:00 2001 From: jjstnlee Date: Thu, 7 Mar 2024 21:08:45 -0800 Subject: [PATCH 03/16] Revert "Revert "Added birthday boxand link for skip button on onboarding"" This reverts commit 7c2d1b5595e1be593c50752d0518bb9c37fb8ade. --- .vscode/settings.json | 4 ++-- src/components/UserStringInput/UserStringInput.tsx | 2 +- src/components/UserStringInput/styles.tsx | 1 + 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/.vscode/settings.json b/.vscode/settings.json index a93e2d6f..46d5ce93 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -1,7 +1,7 @@ { "editor.defaultFormatter": "esbenp.prettier-vscode", "editor.codeActionsOnSave": { - "source.formatDocument": true, - "source.fixAll.eslint": true + "source.formatDocument": "explicit", + "source.fixAll.eslint": "explicit" } } diff --git a/src/components/UserStringInput/UserStringInput.tsx b/src/components/UserStringInput/UserStringInput.tsx index f7cd12d6..da5457a0 100644 --- a/src/components/UserStringInput/UserStringInput.tsx +++ b/src/components/UserStringInput/UserStringInput.tsx @@ -2,8 +2,8 @@ import { ReactNode } from 'react'; import { View, Text, TextInput } from 'react-native'; import styles from './styles'; -import globalStyles from '../../styles/globalStyles'; import colors from '../../styles/colors'; +import globalStyles from '../../styles/globalStyles'; type UserStringInputProps = { placeholder: string; diff --git a/src/components/UserStringInput/styles.tsx b/src/components/UserStringInput/styles.tsx index a11509d5..85ec0e85 100644 --- a/src/components/UserStringInput/styles.tsx +++ b/src/components/UserStringInput/styles.tsx @@ -8,6 +8,7 @@ export default StyleSheet.create({ container: { paddingRight: 10, marginTop: 8, + marginBottom: 16, flexDirection: 'row', alignItems: 'center', justifyContent: 'center', From e3dc2dc135f1a57c71c7660bb3b76bf30c5ca55c Mon Sep 17 00:00:00 2001 From: jjstnlee Date: Sun, 10 Mar 2024 05:59:15 -0700 Subject: [PATCH 04/16] Created Birthday input box placeholder, implemented Skip For Now Button, and styled according to Figma --- src/app/auth/onboarding/index.tsx | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/src/app/auth/onboarding/index.tsx b/src/app/auth/onboarding/index.tsx index a9b9e481..01c889cb 100644 --- a/src/app/auth/onboarding/index.tsx +++ b/src/app/auth/onboarding/index.tsx @@ -113,10 +113,9 @@ function OnboardingScreen() { } }; - // Make sure to bring this back !!!!! - // if (!session) { - // return ; - // } + if (!session) { + return ; + } return ( @@ -139,7 +138,7 @@ function OnboardingScreen() { // onChange={setBirthday} value={birthday} placeholderTextColor={colors.darkGrey} - attributes={null} + attributes={{ editable: false }} > Date: Thu, 14 Mar 2024 02:28:57 -0700 Subject: [PATCH 05/16] Added pseduo birthday input button, implemented Skip For Now, and styled onboarding screen --- src/app/auth/login/index.tsx | 2 +- src/app/auth/onboarding/index.tsx | 8 ++++---- src/app/auth/onboarding/styles.tsx | 6 +----- 3 files changed, 6 insertions(+), 10 deletions(-) diff --git a/src/app/auth/login/index.tsx b/src/app/auth/login/index.tsx index 9dd4e71a..e79c98b4 100644 --- a/src/app/auth/login/index.tsx +++ b/src/app/auth/login/index.tsx @@ -120,7 +120,7 @@ function LoginScreen() { Don't have an account? - + Sign Up diff --git a/src/app/auth/onboarding/index.tsx b/src/app/auth/onboarding/index.tsx index 01c889cb..020cbf82 100644 --- a/src/app/auth/onboarding/index.tsx +++ b/src/app/auth/onboarding/index.tsx @@ -113,13 +113,13 @@ function OnboardingScreen() { } }; - if (!session) { - return ; - } + // if (!session) { + // return ; + // } return ( - + Welcome, {user?.user_metadata.username} diff --git a/src/app/auth/onboarding/styles.tsx b/src/app/auth/onboarding/styles.tsx index 9f24fe33..9e7574d0 100644 --- a/src/app/auth/onboarding/styles.tsx +++ b/src/app/auth/onboarding/styles.tsx @@ -4,7 +4,7 @@ import colors from '../../../styles/colors'; export default StyleSheet.create({ container: { - paddingVertical: 63, + paddingVertical: 66, paddingLeft: 43, paddingRight: 44, }, @@ -12,9 +12,6 @@ export default StyleSheet.create({ color: colors.darkGrey, marginLeft: 8, }, - h1: { - marginTop: 66, - }, body1: { marginTop: 26, }, @@ -22,7 +19,6 @@ export default StyleSheet.create({ flex: 1, flexDirection: 'row', marginTop: 12, - marginBottom: 16, width: 250, }, bottomContainer: { From 6966f2e09cda4368168a6f40afcc37e78d2b446d Mon Sep 17 00:00:00 2001 From: jjstnlee Date: Sat, 16 Mar 2024 11:04:12 -0700 Subject: [PATCH 06/16] Added back commented/changed out code and also fixed the screen to be white --- src/app/auth/login/index.tsx | 2 +- src/app/auth/onboarding/index.tsx | 6 +++--- src/app/auth/onboarding/styles.tsx | 1 + 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/src/app/auth/login/index.tsx b/src/app/auth/login/index.tsx index e79c98b4..9dd4e71a 100644 --- a/src/app/auth/login/index.tsx +++ b/src/app/auth/login/index.tsx @@ -120,7 +120,7 @@ function LoginScreen() { Don't have an account? - + Sign Up diff --git a/src/app/auth/onboarding/index.tsx b/src/app/auth/onboarding/index.tsx index 020cbf82..ed3c3901 100644 --- a/src/app/auth/onboarding/index.tsx +++ b/src/app/auth/onboarding/index.tsx @@ -113,9 +113,9 @@ function OnboardingScreen() { } }; - // if (!session) { - // return ; - // } + if (!session) { + return ; + } return ( diff --git a/src/app/auth/onboarding/styles.tsx b/src/app/auth/onboarding/styles.tsx index 9e7574d0..827186a3 100644 --- a/src/app/auth/onboarding/styles.tsx +++ b/src/app/auth/onboarding/styles.tsx @@ -7,6 +7,7 @@ export default StyleSheet.create({ paddingVertical: 66, paddingLeft: 43, paddingRight: 44, + backgroundColor: 'white', }, subtext: { color: colors.darkGrey, From 069d5cce51709ce73be137dad87a3a1330a28f90 Mon Sep 17 00:00:00 2001 From: Aditya Pawar Date: Sat, 16 Mar 2024 13:07:09 -0700 Subject: [PATCH 07/16] Fix login button --- src/app/auth/signup/index.tsx | 8 +++++--- src/app/auth/signup/styles.tsx | 6 ++++-- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/src/app/auth/signup/index.tsx b/src/app/auth/signup/index.tsx index 41246d2c..092d5044 100644 --- a/src/app/auth/signup/index.tsx +++ b/src/app/auth/signup/index.tsx @@ -257,12 +257,14 @@ function SignUpScreen() { onPress={signUpWithEmail} /> - - Already have an account?{' '} + + + Already have an account? + Log In - + diff --git a/src/app/auth/signup/styles.tsx b/src/app/auth/signup/styles.tsx index 600bcb26..51de2d40 100644 --- a/src/app/auth/signup/styles.tsx +++ b/src/app/auth/signup/styles.tsx @@ -14,9 +14,11 @@ export default StyleSheet.create({ textDecorationLine: 'underline', }, redirectText: { - textAlign: 'center', - marginBottom: 64, + gap: 8, + flexDirection: 'row', + justifyContent: 'center', marginTop: 16, + marginBottom: 64, }, title: { paddingTop: 64, From febfa40dd36a88a14a2d59215f77ddefe9362139 Mon Sep 17 00:00:00 2001 From: Aditya Pawar Date: Mon, 18 Mar 2024 17:27:27 -0700 Subject: [PATCH 08/16] Fix merge errors --- src/app/auth/onboarding/styles.tsx | 1 + src/app/auth/signup/index.tsx | 4 +--- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/src/app/auth/onboarding/styles.tsx b/src/app/auth/onboarding/styles.tsx index 615e8129..4d21f30b 100644 --- a/src/app/auth/onboarding/styles.tsx +++ b/src/app/auth/onboarding/styles.tsx @@ -40,6 +40,7 @@ export default StyleSheet.create({ flex: 1, alignSelf: 'center', color: colors.darkGrey, + }, icon: { paddingLeft: 8, }, diff --git a/src/app/auth/signup/index.tsx b/src/app/auth/signup/index.tsx index 092d5044..52a044a3 100644 --- a/src/app/auth/signup/index.tsx +++ b/src/app/auth/signup/index.tsx @@ -258,9 +258,7 @@ function SignUpScreen() { /> - - Already have an account? - + Already have an account? Log In From 5b5b0d884b381f7ba84f88b3670290b501b43347 Mon Sep 17 00:00:00 2001 From: jjstnlee Date: Mon, 18 Mar 2024 19:29:06 -0700 Subject: [PATCH 09/16] Fixed requested changes Yur --- package-lock.json | 2 +- package.json | 2 +- src/app/auth/onboarding/index.tsx | 139 +++++++----------- src/app/auth/onboarding/styles.tsx | 14 +- .../UserSelectorInput/UserSelectorInput.tsx | 4 +- src/components/UserSelectorInput/styles.tsx | 5 +- src/components/UserStringInput/styles.tsx | 1 - 7 files changed, 66 insertions(+), 101 deletions(-) diff --git a/package-lock.json b/package-lock.json index 93232be4..b1f5b69e 100644 --- a/package-lock.json +++ b/package-lock.json @@ -17,7 +17,7 @@ "@mui/styled-engine-sc": "^6.0.0-alpha.1", "@mui/system": "^5.14.13", "@react-native-async-storage/async-storage": "^1.18.2", - "@react-native-community/datetimepicker": "7.2.0", + "@react-native-community/datetimepicker": "^7.2.0", "@react-navigation/bottom-tabs": "^6.5.9", "@react-navigation/material-bottom-tabs": "^6.2.17", "@react-navigation/native": "^6.1.8", diff --git a/package.json b/package.json index 5518a736..7ba5f154 100644 --- a/package.json +++ b/package.json @@ -21,7 +21,7 @@ "@mui/styled-engine-sc": "^6.0.0-alpha.1", "@mui/system": "^5.14.13", "@react-native-async-storage/async-storage": "^1.18.2", - "@react-native-community/datetimepicker": "7.2.0", + "@react-native-community/datetimepicker": "^7.2.0", "@react-navigation/bottom-tabs": "^6.5.9", "@react-navigation/material-bottom-tabs": "^6.2.17", "@react-navigation/native": "^6.1.8", diff --git a/src/app/auth/onboarding/index.tsx b/src/app/auth/onboarding/index.tsx index 57999698..5bb231a9 100644 --- a/src/app/auth/onboarding/index.tsx +++ b/src/app/auth/onboarding/index.tsx @@ -1,4 +1,3 @@ -import DateTimePicker from '@react-native-community/datetimepicker'; import { Link, Redirect, router } from 'expo-router'; import { useState, useEffect } from 'react'; import { @@ -10,9 +9,9 @@ import { Appearance, } from 'react-native'; import { Icon } from 'react-native-elements'; +import DateTimePickerModal from 'react-native-modal-datetime-picker'; import styles from './styles'; -import colors from '../../../styles/colors'; import StyledButton from '../../../components/StyledButton/StyledButton'; import UserSelectorInput from '../../../components/UserSelectorInput/UserSelectorInput'; import UserStringInput from '../../../components/UserStringInput/UserStringInput'; @@ -20,8 +19,6 @@ import colors from '../../../styles/colors'; import globalStyles from '../../../styles/globalStyles'; import { useSession } from '../../../utils/AuthContext'; import supabase from '../../../utils/supabase'; -import UserStringInput from '../../../components/UserStringInput/UserStringInput'; -import DateTimePickerModal from 'react-native-modal-datetime-picker'; function OnboardingScreen() { const { session, user } = useSession(); @@ -164,7 +161,7 @@ function OnboardingScreen() { isDarkModeEnabled={isDark} themeVariant={isDark ? 'dark' : 'light'} /> - + Welcome, {user?.user_metadata.username} @@ -177,91 +174,69 @@ function OnboardingScreen() { visible to other users on the app. - - - { - setShowDatePicker(!showDatePicker); - }} - > - - - - - - + + + { + setShowDatePicker(!showDatePicker); + }} + > + + + + + + + + + + - - - - - - - - + diff --git a/src/app/auth/onboarding/styles.tsx b/src/app/auth/onboarding/styles.tsx index 4d21f30b..092e566a 100644 --- a/src/app/auth/onboarding/styles.tsx +++ b/src/app/auth/onboarding/styles.tsx @@ -4,18 +4,16 @@ import colors from '../../../styles/colors'; export default StyleSheet.create({ container: { + flexGrow: 1, + justifyContent: 'space-between', paddingVertical: 66, paddingLeft: 43, - flex: 1, paddingRight: 44, backgroundColor: 'white', }, - verticallySpaced: { + inputContainer: { flex: 1, - justifyContent: 'space-between', - }, - datePickerButton: { - paddingBottom: 16, + gap: 16, }, subtext: { color: colors.darkGrey, @@ -29,11 +27,7 @@ export default StyleSheet.create({ marginTop: 12, width: 250, }, - bottomContainer: { - marginTop: 112, - }, updateProfileButton: { - marginTop: 30, marginBottom: 24, }, skipButton: { diff --git a/src/components/UserSelectorInput/UserSelectorInput.tsx b/src/components/UserSelectorInput/UserSelectorInput.tsx index dd5be4fc..a032b1ab 100644 --- a/src/components/UserSelectorInput/UserSelectorInput.tsx +++ b/src/components/UserSelectorInput/UserSelectorInput.tsx @@ -24,7 +24,7 @@ function UserSelectorInput({ value, }: UserSelectorInputProps) { return ( - + {label} ( diff --git a/src/components/UserSelectorInput/styles.tsx b/src/components/UserSelectorInput/styles.tsx index ad54c0ab..de70f6e7 100644 --- a/src/components/UserSelectorInput/styles.tsx +++ b/src/components/UserSelectorInput/styles.tsx @@ -10,11 +10,8 @@ export default StyleSheet.create({ position: 'relative', zIndex: 1, }, - container: { - marginBottom: 16, - }, label: { - marginBottom: 10, + marginBottom: 8, }, dropdown: { height: 50, diff --git a/src/components/UserStringInput/styles.tsx b/src/components/UserStringInput/styles.tsx index 85ec0e85..a11509d5 100644 --- a/src/components/UserStringInput/styles.tsx +++ b/src/components/UserStringInput/styles.tsx @@ -8,7 +8,6 @@ export default StyleSheet.create({ container: { paddingRight: 10, marginTop: 8, - marginBottom: 16, flexDirection: 'row', alignItems: 'center', justifyContent: 'center', From 9dbefec7cab959f538d33cbc7cfded0679031e54 Mon Sep 17 00:00:00 2001 From: Aditya Pawar Date: Tue, 26 Mar 2024 23:02:59 -0700 Subject: [PATCH 10/16] Fix spacing --- src/app/auth/login/index.tsx | 2 +- src/app/auth/onboarding/index.tsx | 199 +++++++++++++++-------------- src/app/auth/onboarding/styles.tsx | 8 +- 3 files changed, 108 insertions(+), 101 deletions(-) diff --git a/src/app/auth/login/index.tsx b/src/app/auth/login/index.tsx index 9dd4e71a..e79c98b4 100644 --- a/src/app/auth/login/index.tsx +++ b/src/app/auth/login/index.tsx @@ -120,7 +120,7 @@ function LoginScreen() { Don't have an account? - + Sign Up diff --git a/src/app/auth/onboarding/index.tsx b/src/app/auth/onboarding/index.tsx index 5bb231a9..5647f564 100644 --- a/src/app/auth/onboarding/index.tsx +++ b/src/app/auth/onboarding/index.tsx @@ -19,6 +19,7 @@ import colors from '../../../styles/colors'; import globalStyles from '../../../styles/globalStyles'; import { useSession } from '../../../utils/AuthContext'; import supabase from '../../../utils/supabase'; +import { SafeAreaView } from 'react-native-safe-area-context'; function OnboardingScreen() { const { session, user } = useSession(); @@ -144,110 +145,112 @@ function OnboardingScreen() { setBirthdayExists(true); }; - if (!session) { - return ; - } + // if (!session) { + // return ; + // } return ( - - - setShowDatePicker(false)} - date={displayDate} - display="inline" - isDarkModeEnabled={isDark} - themeVariant={isDark ? 'dark' : 'light'} - /> - - Welcome, {user?.user_metadata.username} - - - Input your profile information below. - - - - - This information is only used for outreach efforts, and will not be - visible to other users on the app. + + + + setShowDatePicker(false)} + date={displayDate} + display="inline" + isDarkModeEnabled={isDark} + themeVariant={isDark ? 'dark' : 'light'} + /> + + Welcome, {user?.user_metadata.username} - - - - { - setShowDatePicker(!showDatePicker); - }} - > - - - - - - + + Input your profile information below. + + + + + This information is only used for outreach efforts, and will not be + visible to other users on the app. + + + + + { + setShowDatePicker(!showDatePicker); + }} + > + + + + + + + + + + - - - - - - - - + + + + + + + Skip For Now + - - Skip For Now - - - + + ); } diff --git a/src/app/auth/onboarding/styles.tsx b/src/app/auth/onboarding/styles.tsx index 092e566a..6555413a 100644 --- a/src/app/auth/onboarding/styles.tsx +++ b/src/app/auth/onboarding/styles.tsx @@ -4,12 +4,16 @@ import colors from '../../../styles/colors'; export default StyleSheet.create({ container: { + backgroundColor: 'white', + flex: 1, + }, + flex: { flexGrow: 1, justifyContent: 'space-between', - paddingVertical: 66, + paddingTop: 64, + paddingBottom: 54, paddingLeft: 43, paddingRight: 44, - backgroundColor: 'white', }, inputContainer: { flex: 1, From 53fe3873c01ab1b5ec79304936505ed03f978567 Mon Sep 17 00:00:00 2001 From: Aditya Pawar Date: Tue, 26 Mar 2024 23:14:58 -0700 Subject: [PATCH 11/16] Fix UserSelectorInput height --- src/app/auth/onboarding/index.tsx | 4 ++-- src/components/UserSelectorInput/styles.tsx | 3 ++- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/src/app/auth/onboarding/index.tsx b/src/app/auth/onboarding/index.tsx index 5647f564..9158928f 100644 --- a/src/app/auth/onboarding/index.tsx +++ b/src/app/auth/onboarding/index.tsx @@ -172,8 +172,8 @@ function OnboardingScreen() { - This information is only used for outreach efforts, and will not be - visible to other users on the app. + This information is only used for outreach efforts, and will not + be visible to other users on the app. diff --git a/src/components/UserSelectorInput/styles.tsx b/src/components/UserSelectorInput/styles.tsx index de70f6e7..b2008309 100644 --- a/src/components/UserSelectorInput/styles.tsx +++ b/src/components/UserSelectorInput/styles.tsx @@ -14,10 +14,11 @@ export default StyleSheet.create({ marginBottom: 8, }, dropdown: { - height: 50, + height: 43, borderWidth: 1, borderRadius: 5, paddingHorizontal: 10, + paddingVertical: 10 }, dropdownContainer: { borderRadius: 5, From 58e025f8656734e3ca31f7ce8985a2ed796a5459 Mon Sep 17 00:00:00 2001 From: Aditya Pawar Date: Tue, 26 Mar 2024 23:31:50 -0700 Subject: [PATCH 12/16] Fix pronouns --- src/app/(tabs)/home/index.tsx | 2 +- src/app/auth/login/index.tsx | 2 +- src/app/auth/onboarding/index.tsx | 6 +-- src/app/settings/index.tsx | 64 ++++++++++++++++--------------- src/app/settings/styles.tsx | 4 ++ 5 files changed, 42 insertions(+), 36 deletions(-) diff --git a/src/app/(tabs)/home/index.tsx b/src/app/(tabs)/home/index.tsx index 7c224297..74768afa 100644 --- a/src/app/(tabs)/home/index.tsx +++ b/src/app/(tabs)/home/index.tsx @@ -86,7 +86,7 @@ function HomeScreen() { {featuredStories.map(story => ( Don't have an account? - + Sign Up diff --git a/src/app/auth/onboarding/index.tsx b/src/app/auth/onboarding/index.tsx index 9158928f..a514b849 100644 --- a/src/app/auth/onboarding/index.tsx +++ b/src/app/auth/onboarding/index.tsx @@ -145,9 +145,9 @@ function OnboardingScreen() { setBirthdayExists(true); }; - // if (!session) { - // return ; - // } + if (!session) { + return ; + } return ( diff --git a/src/app/settings/index.tsx b/src/app/settings/index.tsx index bd846b2b..6210f2e3 100644 --- a/src/app/settings/index.tsx +++ b/src/app/settings/index.tsx @@ -57,7 +57,7 @@ function SettingsScreen() { const { data, error, status } = await supabase .from('profiles') .select( - `first_name, last_name, username, birthday, gender, race_ethnicity`, + `first_name, last_name, username, birthday, gender, race_ethnicity, pronouns`, ) .eq('user_id', session?.user.id) .single(); @@ -81,7 +81,7 @@ function SettingsScreen() { } setGender(data.gender || gender); - // setPronouns(data.pronouns || pronouns); + setPronouns(data.pronouns || pronouns); setRaceEthnicity(data.race_ethnicity || raceEthnicity); } } catch (error) { @@ -115,8 +115,6 @@ function SettingsScreen() { // Only update values that are not blank const updates = { - ...(firstName && { first_name: firstName }), - ...(lastName && { last_name: lastName }), ...(gender && { gender }), ...(pronouns && { pronouns }), ...(raceEthnicity && { race_ethnicity: raceEthnicity }), @@ -131,12 +129,15 @@ function SettingsScreen() { if (count && count >= 1) { // Update user if they exist - const { error } = await supabase + const { error, data } = await supabase .from('profiles') .update(updates) .eq('user_id', session?.user.id) .select('*'); + console.log(data); + + if (error && error instanceof Error) { if (process.env.NODE_ENV !== 'production') { throw error; @@ -189,7 +190,6 @@ function SettingsScreen() { {' - - - - + + + + + {birthdayChanged && ( diff --git a/src/app/settings/styles.tsx b/src/app/settings/styles.tsx index 580f7838..dacd1c92 100644 --- a/src/app/settings/styles.tsx +++ b/src/app/settings/styles.tsx @@ -2,6 +2,10 @@ import { StyleSheet } from 'react-native'; import colors from '../../styles/colors'; export default StyleSheet.create({ + selectors: { + flex: 1, + gap: 16 + }, container: { flex: 1, backgroundColor: 'white', From 3aeb4312fc9d7d2be1eeb04ccd722f2db389e47a Mon Sep 17 00:00:00 2001 From: Aditya Pawar Date: Tue, 26 Mar 2024 23:34:25 -0700 Subject: [PATCH 13/16] Remove logs --- src/app/settings/index.tsx | 5 +---- src/app/settings/styles.tsx | 2 +- src/components/UserSelectorInput/styles.tsx | 2 +- 3 files changed, 3 insertions(+), 6 deletions(-) diff --git a/src/app/settings/index.tsx b/src/app/settings/index.tsx index 6210f2e3..40f501ad 100644 --- a/src/app/settings/index.tsx +++ b/src/app/settings/index.tsx @@ -129,15 +129,12 @@ function SettingsScreen() { if (count && count >= 1) { // Update user if they exist - const { error, data } = await supabase + const { error } = await supabase .from('profiles') .update(updates) .eq('user_id', session?.user.id) .select('*'); - console.log(data); - - if (error && error instanceof Error) { if (process.env.NODE_ENV !== 'production') { throw error; diff --git a/src/app/settings/styles.tsx b/src/app/settings/styles.tsx index dacd1c92..944c1819 100644 --- a/src/app/settings/styles.tsx +++ b/src/app/settings/styles.tsx @@ -4,7 +4,7 @@ import colors from '../../styles/colors'; export default StyleSheet.create({ selectors: { flex: 1, - gap: 16 + gap: 16, }, container: { flex: 1, diff --git a/src/components/UserSelectorInput/styles.tsx b/src/components/UserSelectorInput/styles.tsx index b2008309..88506d10 100644 --- a/src/components/UserSelectorInput/styles.tsx +++ b/src/components/UserSelectorInput/styles.tsx @@ -18,7 +18,7 @@ export default StyleSheet.create({ borderWidth: 1, borderRadius: 5, paddingHorizontal: 10, - paddingVertical: 10 + paddingVertical: 10, }, dropdownContainer: { borderRadius: 5, From 78e84664c981a237084650b19adcb87ef0c37fdc Mon Sep 17 00:00:00 2001 From: Aditya Pawar Date: Wed, 27 Mar 2024 00:00:24 -0700 Subject: [PATCH 14/16] Various style changes --- src/app/(tabs)/home/index.tsx | 2 +- src/components/UserSelectorInput/styles.tsx | 2 +- src/components/UserStringInput/UserStringInput.tsx | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/app/(tabs)/home/index.tsx b/src/app/(tabs)/home/index.tsx index 74768afa..81ffc8db 100644 --- a/src/app/(tabs)/home/index.tsx +++ b/src/app/(tabs)/home/index.tsx @@ -68,7 +68,7 @@ function HomeScreen() { contentContainerStyle={{ paddingHorizontal: 8 }} > - + {username ? `Welcome, ${username}` : 'Welcome!'} router.push('/settings')}> diff --git a/src/components/UserSelectorInput/styles.tsx b/src/components/UserSelectorInput/styles.tsx index 88506d10..734f782b 100644 --- a/src/components/UserSelectorInput/styles.tsx +++ b/src/components/UserSelectorInput/styles.tsx @@ -14,7 +14,7 @@ export default StyleSheet.create({ marginBottom: 8, }, dropdown: { - height: 43, + height: 44, borderWidth: 1, borderRadius: 5, paddingHorizontal: 10, diff --git a/src/components/UserStringInput/UserStringInput.tsx b/src/components/UserStringInput/UserStringInput.tsx index da5457a0..07961a97 100644 --- a/src/components/UserStringInput/UserStringInput.tsx +++ b/src/components/UserStringInput/UserStringInput.tsx @@ -23,8 +23,8 @@ export default function UserStringInput({ label, children, labelColor = '#000', - placeholderTextColor = '#000', - onChange = _ => {}, + placeholderTextColor = colors.darkGrey, + onChange = _ => { }, }: UserStringInputProps) { return ( From 2a786c28e80c0813e5dc780f2ae12c76556cf177 Mon Sep 17 00:00:00 2001 From: Aditya Pawar Date: Wed, 27 Mar 2024 00:00:24 -0700 Subject: [PATCH 15/16] Various style changes --- src/app/(tabs)/home/index.tsx | 2 +- src/components/UserSelectorInput/styles.tsx | 2 +- src/components/UserStringInput/UserStringInput.tsx | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/app/(tabs)/home/index.tsx b/src/app/(tabs)/home/index.tsx index 74768afa..81ffc8db 100644 --- a/src/app/(tabs)/home/index.tsx +++ b/src/app/(tabs)/home/index.tsx @@ -68,7 +68,7 @@ function HomeScreen() { contentContainerStyle={{ paddingHorizontal: 8 }} > - + {username ? `Welcome, ${username}` : 'Welcome!'} router.push('/settings')}> diff --git a/src/components/UserSelectorInput/styles.tsx b/src/components/UserSelectorInput/styles.tsx index 88506d10..734f782b 100644 --- a/src/components/UserSelectorInput/styles.tsx +++ b/src/components/UserSelectorInput/styles.tsx @@ -14,7 +14,7 @@ export default StyleSheet.create({ marginBottom: 8, }, dropdown: { - height: 43, + height: 44, borderWidth: 1, borderRadius: 5, paddingHorizontal: 10, diff --git a/src/components/UserStringInput/UserStringInput.tsx b/src/components/UserStringInput/UserStringInput.tsx index da5457a0..07961a97 100644 --- a/src/components/UserStringInput/UserStringInput.tsx +++ b/src/components/UserStringInput/UserStringInput.tsx @@ -23,8 +23,8 @@ export default function UserStringInput({ label, children, labelColor = '#000', - placeholderTextColor = '#000', - onChange = _ => {}, + placeholderTextColor = colors.darkGrey, + onChange = _ => { }, }: UserStringInputProps) { return ( From 2319c0612979c7cfd7e424a4c5408c6145821860 Mon Sep 17 00:00:00 2001 From: Aditya Pawar Date: Wed, 27 Mar 2024 00:03:52 -0700 Subject: [PATCH 16/16] Run prettier --- src/components/UserStringInput/UserStringInput.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/UserStringInput/UserStringInput.tsx b/src/components/UserStringInput/UserStringInput.tsx index 07961a97..6d2d586b 100644 --- a/src/components/UserStringInput/UserStringInput.tsx +++ b/src/components/UserStringInput/UserStringInput.tsx @@ -24,7 +24,7 @@ export default function UserStringInput({ children, labelColor = '#000', placeholderTextColor = colors.darkGrey, - onChange = _ => { }, + onChange = _ => {}, }: UserStringInputProps) { return (