Skip to content

Commit

Permalink
Bug bash changes
Browse files Browse the repository at this point in the history
  • Loading branch information
adityapawar1 committed Apr 19, 2024
1 parent b9865bc commit 5724783
Show file tree
Hide file tree
Showing 4 changed files with 40 additions and 15 deletions.
34 changes: 22 additions & 12 deletions src/app/(tabs)/story/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ function StoryScreen() {
style={styles.authorImage}
source={{ uri: story.author_image ? story.author_image : '' }}
/>
<Text style={globalStyles.subHeading1Bold}>
<Text style={[globalStyles.subHeading1Bold, { textDecorationLine: 'underline' }]}>
By {story.author_name}
</Text>
</View>
Expand Down Expand Up @@ -161,15 +161,24 @@ function StoryScreen() {
systemFonts={fonts}
/>

<View style={styles.author}>
<Image
style={styles.authorImage}
source={{ uri: story.author_image }}
/>
<Text style={globalStyles.subHeading1Bold}>
By {story.author_name}
</Text>
</View>
<TouchableOpacity
onPress={() => {
router.push({
pathname: '/author',
params: { author: story.author_id.toString() },
});
}}
>
<View style={styles.author}>
<Image
style={styles.authorImage}
source={{ uri: story.author_image ? story.author_image : '' }}
/>
<Text style={[globalStyles.subHeading1Bold, { textDecorationLine: 'underline' }]}>
By {story.author_name}
</Text>
</View>
</TouchableOpacity>

<Button
textColor="black"
Expand All @@ -180,8 +189,9 @@ function StoryScreen() {
<Text style={globalStyles.bodyBoldUnderline}>Back To Top</Text>
</Button>
</ScrollView>
)}
</SafeAreaView>
)
}
</SafeAreaView >
);
}

Expand Down
11 changes: 11 additions & 0 deletions src/app/auth/onboarding/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down Expand Up @@ -142,6 +143,7 @@ function OnboardingScreen() {
};

const onConfirmDate = (date: Date) => {
setBirthdayChanged(true);
setShowDatePicker(false);
setBirthday(date.toLocaleDateString());
setDisplayDate(date);
Expand Down Expand Up @@ -235,6 +237,14 @@ function OnboardingScreen() {
</View>

<View>
{birthdayChanged && (
<View style={[styles.info, styles.warning]}>
<Icon type="material" name="info-outline" color="#797979" />
<Text style={[globalStyles.subtext, styles.subtext]}>
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.
</Text>
</View>
)}
<View style={styles.updateProfileButton}>
<StyledButton
text="Update profile"
Expand All @@ -248,6 +258,7 @@ function OnboardingScreen() {
}
/>
</View>

<Link
style={[globalStyles.bodyBoldUnderline, styles.skipButton]}
href="/(tabs)/home"
Expand Down
4 changes: 4 additions & 0 deletions src/app/auth/onboarding/styles.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,10 @@ export default StyleSheet.create({
body1: {
marginTop: 26,
},
warning: {
marginTop: 40,
marginBottom: 24,
},
info: {
flexDirection: 'row',
marginTop: 12,
Expand Down
6 changes: 3 additions & 3 deletions src/app/auth/signup/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -171,14 +171,14 @@ function SignUpScreen() {
placeholder="First Name"
label="First Name"
placeholderTextColor={colors.darkGrey}
onChange={setFirstName}
onChange={text => setFirstName(text.replaceAll(/[^a-zA-Z]/g, ""))}
value={firstName}
/>
<UserStringInput
placeholder="Last Name"
label="Last Name"
placeholderTextColor={colors.darkGrey}
onChange={setLastName}
onChange={text => setLastName(text.replaceAll(/[^a-zA-Z]/g, ""))}
value={lastName}
/>
<UserStringInput
Expand Down Expand Up @@ -264,7 +264,7 @@ function SignUpScreen() {
</View>
<View style={styles.redirectText}>
<Text style={globalStyles.body1}>Already have an account?</Text>
<Link style={globalStyles.bodyBoldUnderline} href="/auth/login">
<Link style={globalStyles.bodyBoldUnderline} href="/auth/signup">
Log In
</Link>
</View>
Expand Down

0 comments on commit 5724783

Please sign in to comment.