From 5724783b3d92d3058be0e184c38ed10676c7ee25 Mon Sep 17 00:00:00 2001 From: Aditya Pawar Date: Thu, 18 Apr 2024 21:31:24 -0700 Subject: [PATCH 1/2] Bug bash changes --- src/app/(tabs)/story/index.tsx | 34 +++++++++++++++++++----------- src/app/auth/onboarding/index.tsx | 11 ++++++++++ src/app/auth/onboarding/styles.tsx | 4 ++++ src/app/auth/signup/index.tsx | 6 +++--- 4 files changed, 40 insertions(+), 15 deletions(-) diff --git a/src/app/(tabs)/story/index.tsx b/src/app/(tabs)/story/index.tsx index 2387f2f..23ff2fb 100644 --- a/src/app/(tabs)/story/index.tsx +++ b/src/app/(tabs)/story/index.tsx @@ -89,7 +89,7 @@ function StoryScreen() { style={styles.authorImage} source={{ uri: story.author_image ? story.author_image : '' }} /> - + By {story.author_name} @@ -161,15 +161,24 @@ function StoryScreen() { systemFonts={fonts} /> - - - - By {story.author_name} - - + { + router.push({ + pathname: '/author', + params: { author: story.author_id.toString() }, + }); + }} + > + + + + By {story.author_name} + + + - )} - + ) + } + ); } diff --git a/src/app/auth/onboarding/index.tsx b/src/app/auth/onboarding/index.tsx index ea0af6e..1a19215 100644 --- a/src/app/auth/onboarding/index.tsx +++ b/src/app/auth/onboarding/index.tsx @@ -30,6 +30,7 @@ function OnboardingScreen() { const [pronouns, setPronouns] = useState(''); const [birthday, setBirthday] = useState(''); const [birthdayExists, setBirthdayExists] = useState(false); + const [birthdayChanged, setBirthdayChanged] = useState(false); const [gender, setGender] = useState(''); const [raceEthnicity, setRaceEthnicity] = useState(''); const [showDatePicker, setShowDatePicker] = useState(false); @@ -142,6 +143,7 @@ function OnboardingScreen() { }; const onConfirmDate = (date: Date) => { + setBirthdayChanged(true); setShowDatePicker(false); setBirthday(date.toLocaleDateString()); setDisplayDate(date); @@ -235,6 +237,14 @@ function OnboardingScreen() { + {birthdayChanged && ( + + + + You can only input your birthday once. Please make sure the date is correct before saving as you will not be able to change your birthday in the future. + + + )} + setFirstName(text.replaceAll(/[^a-zA-Z]/g, ""))} value={firstName} /> setLastName(text.replaceAll(/[^a-zA-Z]/g, ""))} value={lastName} /> Already have an account? - + Log In From b4e00e5e073e85ef78841e6b492497200c1e8c24 Mon Sep 17 00:00:00 2001 From: Aditya Pawar Date: Thu, 18 Apr 2024 21:33:03 -0700 Subject: [PATCH 2/2] Change link back to login --- src/app/(tabs)/story/index.tsx | 19 ++++++++++++++----- src/app/auth/onboarding/index.tsx | 4 +++- src/app/auth/signup/index.tsx | 6 +++--- 3 files changed, 20 insertions(+), 9 deletions(-) diff --git a/src/app/(tabs)/story/index.tsx b/src/app/(tabs)/story/index.tsx index 23ff2fb..2995426 100644 --- a/src/app/(tabs)/story/index.tsx +++ b/src/app/(tabs)/story/index.tsx @@ -89,7 +89,12 @@ function StoryScreen() { style={styles.authorImage} source={{ uri: story.author_image ? story.author_image : '' }} /> - + By {story.author_name} @@ -174,7 +179,12 @@ function StoryScreen() { style={styles.authorImage} source={{ uri: story.author_image ? story.author_image : '' }} /> - + By {story.author_name} @@ -189,9 +199,8 @@ function StoryScreen() { Back To Top - ) - } - + )} + ); } diff --git a/src/app/auth/onboarding/index.tsx b/src/app/auth/onboarding/index.tsx index 1a19215..8667173 100644 --- a/src/app/auth/onboarding/index.tsx +++ b/src/app/auth/onboarding/index.tsx @@ -241,7 +241,9 @@ function OnboardingScreen() { - You can only input your birthday once. Please make sure the date is correct before saving as you will not be able to change your birthday in the future. + You can only input your birthday once. Please make sure the date + is correct before saving as you will not be able to change your + birthday in the future. )} diff --git a/src/app/auth/signup/index.tsx b/src/app/auth/signup/index.tsx index 163faf8..f75aeab 100644 --- a/src/app/auth/signup/index.tsx +++ b/src/app/auth/signup/index.tsx @@ -171,14 +171,14 @@ function SignUpScreen() { placeholder="First Name" label="First Name" placeholderTextColor={colors.darkGrey} - onChange={text => setFirstName(text.replaceAll(/[^a-zA-Z]/g, ""))} + onChange={text => setFirstName(text.replaceAll(/[^a-zA-Z]/g, ''))} value={firstName} /> setLastName(text.replaceAll(/[^a-zA-Z]/g, ""))} + onChange={text => setLastName(text.replaceAll(/[^a-zA-Z]/g, ''))} value={lastName} /> Already have an account? - + Log In