Skip to content

Commit

Permalink
Temp fix for spacing for tab bar
Browse files Browse the repository at this point in the history
  • Loading branch information
adityapawar1 committed Apr 7, 2024
1 parent 6a685a1 commit ea44cc5
Show file tree
Hide file tree
Showing 12 changed files with 23 additions and 13 deletions.
1 change: 0 additions & 1 deletion src/app/(tabs)/_layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,6 @@ function TabNav() {
headerShown: false,
tabBarLabel: 'Home',
tabBarIcon: ({ color }) => HomeIcon({ color }),
// tabBarLabelStyle: { borderTopWidth: 12, paddingTop: 12 },
}}
/>
<Tabs.Screen
Expand Down
7 changes: 5 additions & 2 deletions src/app/(tabs)/author/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -46,13 +46,13 @@ function AuthorScreen() {
}, [author]);

return (
<SafeAreaView style={[globalStyles.container, { marginHorizontal: -8 }]}>
<SafeAreaView style={[globalStyles.tabBarContainer, { marginHorizontal: -8 }]}>
{isLoading ? (
<ActivityIndicator />
) : (
<ScrollView
showsVerticalScrollIndicator={false}
bounces={false}
bounces={true}
contentContainerStyle={{ paddingHorizontal: 8 }}
>
<BackButton pressFunction={() => router.back()} />
Expand Down Expand Up @@ -127,6 +127,9 @@ function AuthorScreen() {
}
/>
))}

{/* View so there's space between the tab bar and the stories */}
<View style={{ paddingBottom: 10 }}></View>
</ScrollView>
)}
</SafeAreaView>
Expand Down
2 changes: 1 addition & 1 deletion src/app/(tabs)/genre/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -303,7 +303,7 @@ function GenreScreen() {
};

return (
<SafeAreaView style={[globalStyles.container, { paddingHorizontal: 0 }]}>
<SafeAreaView style={[globalStyles.tabBarContainer, { paddingHorizontal: 0 }]}>
<View style={styles.container}>
<View style={styles.headerContainer}>
<BackButton
Expand Down
2 changes: 2 additions & 0 deletions src/app/(tabs)/genre/styles.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ const styles = StyleSheet.create({
marginTop: 30,
marginBottom: 15,
width: '100%',
// paddingBottom: 60,
},
noStoriesText: {
fontSize: 20,
Expand All @@ -31,6 +32,7 @@ const styles = StyleSheet.create({
fontSize: 13,
},
renderStories: {
paddingBottom: 10,
flex: 1,
},
headerContainer: {},
Expand Down
2 changes: 1 addition & 1 deletion src/app/(tabs)/home/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ function HomeScreen() {

return (
<SafeAreaView
style={[globalStyles.container, { marginLeft: -8, marginRight: -32 }]}
style={[globalStyles.tabBarContainer, { marginLeft: -8, marginRight: -32 }]}
>
{loading && (
<View style={styles.loading}>
Expand Down
2 changes: 1 addition & 1 deletion src/app/(tabs)/home/styles.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ const styles = StyleSheet.create({
padding: 8,
},
scrollView2: {
paddingBottom: 80,
paddingBottom: 20,
flexGrow: 0,
padding: 8,
},
Expand Down
2 changes: 1 addition & 1 deletion src/app/(tabs)/library/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import globalStyles from '../../../styles/globalStyles';

function LibraryScreen() {
return (
<SafeAreaView style={globalStyles.container}>
<SafeAreaView style={globalStyles.tabBarContainer}>
<Text style={globalStyles.h1}>Library</Text>
</SafeAreaView>
);
Expand Down
2 changes: 1 addition & 1 deletion src/app/(tabs)/search/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,7 @@ function SearchScreen() {
return (
<SafeAreaView
style={[
globalStyles.container,
globalStyles.tabBarContainer,
showGenreCarousals
? { marginLeft: -8, marginRight: -32 }
: { marginHorizontal: -8 },
Expand Down
1 change: 1 addition & 0 deletions src/app/(tabs)/settings/styles.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ export default StyleSheet.create({
flex: 1,
backgroundColor: 'white',
paddingHorizontal: 24,
paddingBottom: 60
},
button: {
marginBottom: 32,
Expand Down
2 changes: 1 addition & 1 deletion src/app/(tabs)/story/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ function StoryScreen() {
};

return (
<SafeAreaView style={styles.container}>
<SafeAreaView style={[globalStyles.tabBarContainer, styles.container]}>
{isLoading ? (
<ActivityIndicator />
) : (
Expand Down
4 changes: 0 additions & 4 deletions src/app/(tabs)/story/styles.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,6 @@ import colors from '../../../styles/colors';

const styles = StyleSheet.create({
container: {
flex: 1,
backgroundColor: 'white',
alignItems: 'flex-start',
justifyContent: 'flex-start',
paddingLeft: 24,
paddingRight: 24,
paddingTop: 48,
Expand Down
9 changes: 9 additions & 0 deletions src/styles/globalStyles.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,15 @@ export default StyleSheet.create({
justifyContent: 'flex-start',
paddingHorizontal: 24,
},

tabBarContainer: {
flex: 1,
backgroundColor: 'white',
alignItems: 'flex-start',
justifyContent: 'flex-start',
paddingHorizontal: 24,
paddingBottom: 60
},
authContainer: {
marginHorizontal: 38,
flex: 1,
Expand Down

0 comments on commit ea44cc5

Please sign in to comment.