Skip to content

Commit

Permalink
[bug] Bug bash changes (#86)
Browse files Browse the repository at this point in the history
* Bug bash changes

* Change link back to login
  • Loading branch information
adityapawar1 authored Apr 19, 2024
1 parent b9865bc commit 9cc1b1a
Show file tree
Hide file tree
Showing 4 changed files with 48 additions and 12 deletions.
39 changes: 29 additions & 10 deletions src/app/(tabs)/story/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,12 @@ 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 +166,29 @@ 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 Down
13 changes: 13 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,16 @@ 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 +260,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
4 changes: 2 additions & 2 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

0 comments on commit 9cc1b1a

Please sign in to comment.