Skip to content

Commit 5267de9

Browse files
Some style changes
1 parent 1ab86e8 commit 5267de9

13 files changed

+138
-50
lines changed

App.tsx

+1-3
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import React, { useEffect, useReducer } from "react";
22
import RNBootSplash from "react-native-bootsplash";
3-
import { SafeAreaView } from "react-native";
3+
import { SafeAreaView, View } from "react-native";
44
import Routes from "./navigation/Routes";
55
import { defaultState, Provider, reducer } from "./state";
66

@@ -14,11 +14,9 @@ export default function App() {
1414
}, []);
1515

1616
return (
17-
// <SafeAreaView>
1817
<Provider value={{ state, dispatch }}>
1918
<Routes />
2019
</Provider>
21-
// </SafeAreaView>
2220
);
2321
}
2422

android/app/google-services.json

+8
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,14 @@
1313
}
1414
},
1515
"oauth_client": [
16+
{
17+
"client_id": "117683662084-iucvlg2ag7m6ltdko37bsu5n7dqusqqi.apps.googleusercontent.com",
18+
"client_type": 1,
19+
"android_info": {
20+
"package_name": "com.aviatecodersappv1",
21+
"certificate_hash": "d55166038f1ae117fcd2becc0805f399995d18a2"
22+
}
23+
},
1624
{
1725
"client_id": "117683662084-s4b3j3be99981sm7fsnrk17nbaihsjcc.apps.googleusercontent.com",
1826
"client_type": 1,

android/gradle.properties

+1-1
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ android.enableJetifier=true
2727
# Version of flipper SDK to use with React Native
2828
FLIPPER_VERSION=0.75.1
2929

30-
# org.gradle.jvmargs=-Xmx4g
30+
org.gradle.jvmargs=-Xmx4g
3131

3232
MYAPP_UPLOAD_STORE_FILE=my-upload-key.keystore
3333
MYAPP_UPLOAD_KEY_ALIAS=my-key-alias

components/Categories.tsx

+3
Original file line numberDiff line numberDiff line change
@@ -38,10 +38,13 @@ const Categories = ({ navigation }: any) => {
3838
const styles = StyleSheet.create({
3939
container: {
4040
backgroundColor: "#fff",
41+
// paddingBottom: 40,
4142
},
4243
textStyle: {
4344
color: "#000",
4445
fontSize: 19,
46+
// paddingTop: 20,
47+
height: 28,
4548
},
4649
category: {
4750
borderRadius: 12,

components/StatusBarHead.tsx

+18
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
import React, { useState } from "react";
2+
import { StatusBar } from "react-native";
3+
4+
const STYLES = ["dark-content"];
5+
6+
const StatusBarHead = () => {
7+
const [statusBarStyle, setStatusBarStyle] = useState<any>(STYLES[0]);
8+
9+
return (
10+
<StatusBar
11+
animated={true}
12+
backgroundColor="#E0E1E1"
13+
barStyle={statusBarStyle}
14+
/>
15+
);
16+
};
17+
18+
export default StatusBarHead;

screens/BlogScreen.tsx

+2
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ import MaterialIcons from "react-native-vector-icons/MaterialIcons";
1414
import Markdown from "react-native-markdown-display";
1515
import firestore from "@react-native-firebase/firestore";
1616
import { context } from "../state";
17+
import StatusBarHead from "../components/StatusBarHead";
1718

1819
const BlogScreen = ({ route }: any) => {
1920
const [blog, setBlog] = useState<any | (() => any)>([]);
@@ -106,6 +107,7 @@ const BlogScreen = ({ route }: any) => {
106107

107108
return (
108109
<View>
110+
<StatusBarHead />
109111
{blog.fields ? (
110112
<ScrollView showsVerticalScrollIndicator={false}>
111113
<View style={styles.container}>

screens/BookmarkScreen.tsx

+9-3
Original file line numberDiff line numberDiff line change
@@ -47,9 +47,15 @@ const BookmarkScreen = ({ navigation }: any) => {
4747
<Text> No Bookmarks </Text>
4848
</View>
4949
) : (
50-
bookmark.map((item: any) => (
51-
<ListBookmarks id={item} key={item} navigation={navigation} />
52-
))
50+
bookmark
51+
.reverse()
52+
.map((item: any) => (
53+
<ListBookmarks
54+
id={item}
55+
key={item}
56+
navigation={navigation}
57+
/>
58+
))
5359
)}
5460
</View>
5561
) : (

screens/CategoryScreen.tsx

+2
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ import {
77
Image,
88
ScrollView,
99
} from "react-native";
10+
import StatusBarHead from "../components/StatusBarHead";
1011

1112
import { client } from "../lib/contentful";
1213
import { formatedDate } from "../lib/date";
@@ -30,6 +31,7 @@ const CategoryScreen = ({ navigation, route }: any) => {
3031

3132
return (
3233
<ScrollView>
34+
<StatusBarHead />
3335
<View style={styles.container}>
3436
{blog.map((item: any) => (
3537
<TouchableOpacity

screens/ExploreScreen.tsx

+14-6
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ import {
99
ScrollView,
1010
TouchableOpacity,
1111
} from "react-native";
12+
import StatusBarHead from "../components/StatusBarHead";
1213
import { client } from "../lib/contentful";
1314

1415
const ExploreScreen = ({ navigation }: any) => {
@@ -36,6 +37,7 @@ const ExploreScreen = ({ navigation }: any) => {
3637

3738
return (
3839
<View style={styles.container}>
40+
<StatusBarHead />
3941
<TextInput
4042
onChangeText={(search) => setSearch(search)}
4143
style={styles.searchBar}
@@ -54,6 +56,7 @@ const ExploreScreen = ({ navigation }: any) => {
5456
key={index}
5557
>
5658
<Text style={styles.itemText}>{listItem.fields.title}</Text>
59+
<View style={styles.separator}></View>
5760
</TouchableOpacity>
5861
))}
5962
</ScrollView>
@@ -69,23 +72,28 @@ const styles = StyleSheet.create({
6972
justifyContent: "center",
7073
},
7174
searchBar: {
72-
fontSize: 19,
75+
fontSize: 17,
7376
margin: 10,
7477
width: "90%",
75-
height: 50,
78+
// height: 50,
7679
backgroundColor: "#F1F0F1",
80+
borderRadius: 12,
7781
},
7882
itemTextContainer: {
7983
width: `100%`,
80-
backgroundColor: "#1E2E46",
81-
borderRadius: 12,
8284
marginTop: 20,
85+
86+
marginBottom: 5,
87+
},
88+
separator: {
8389
padding: 12,
90+
borderBottomColor: "#c4bfbe",
91+
borderBottomWidth: 1,
8492
},
8593
itemText: {
8694
textAlign: "center",
87-
fontSize: 19,
88-
color: "#fff",
95+
fontSize: 17,
96+
color: "#000",
8997
},
9098
});
9199

screens/HomeScreen.tsx

+41-28
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,12 @@ import {
88
ScrollView,
99
ActivityIndicator,
1010
Dimensions,
11+
StatusBar,
1112
} from "react-native";
1213
import { client } from "../lib/contentful";
1314
import { formatedDate } from "../lib/date";
1415
import Categories from "../components/Categories";
16+
import StatusBarHead from "../components/StatusBarHead";
1517

1618
const HomeScreen = ({ navigation }: any) => {
1719
const [blog, setBlog] = useState<any | (() => any)>([]);
@@ -30,42 +32,51 @@ const HomeScreen = ({ navigation }: any) => {
3032
const deviceWidth = Dimensions.get("window").width;
3133
return (
3234
<View>
35+
<StatusBarHead />
3336
<Categories navigation={navigation} />
34-
<ScrollView>
37+
<ScrollView
38+
contentContainerStyle={styles.scrollContainer}
39+
showsVerticalScrollIndicator={false}
40+
>
3541
<View style={styles.container}>
3642
{blog ? (
3743
blog.map((item: any) => (
38-
<TouchableOpacity
39-
key={item.sys.id}
40-
onPress={() => navigation.navigate("Blog", { id: item.sys.id })}
41-
>
42-
<View style={styles.card}>
43-
<View style={styles.list}>
44-
<View style={styles.separator}>
45-
<Text style={styles.title}>{item.fields.title}</Text>
46-
<Image
47-
style={styles.cardImage}
48-
source={{
49-
uri: `https://${item.fields.coverImage.fields.file.url}`,
50-
}}
51-
/>
44+
<View key={item.sys.id}>
45+
<TouchableOpacity
46+
key={item.sys.id}
47+
onPress={() =>
48+
navigation.navigate("Blog", { id: item.sys.id })
49+
}
50+
>
51+
<View style={styles.card}>
52+
<View style={styles.list}>
53+
<View style={styles.separator}>
54+
<Text style={styles.title}>{item.fields.title}</Text>
55+
<Image
56+
style={styles.cardImage}
57+
source={{
58+
uri: `https://${item.fields.coverImage.fields.file.url}`,
59+
}}
60+
/>
5261

53-
<View style={styles.cardHeader}>
54-
<View>
55-
<Text style={styles.description}>
56-
{item.fields.description}
57-
</Text>
58-
<View style={styles.timeContainer}>
59-
<Text style={styles.time}>
60-
{formatedDate(item.fields.publishedOn)}
62+
<View style={styles.cardHeader}>
63+
<View>
64+
<Text style={styles.description}>
65+
{item.fields.description}
6166
</Text>
67+
<View style={styles.timeContainer}>
68+
<Text style={styles.time}>
69+
{formatedDate(item.fields.publishedOn)}
70+
</Text>
71+
</View>
6272
</View>
6373
</View>
6474
</View>
6575
</View>
6676
</View>
67-
</View>
68-
</TouchableOpacity>
77+
</TouchableOpacity>
78+
{/* <View style={styles.separator}></View> */}
79+
</View>
6980
))
7081
) : (
7182
<ActivityIndicator
@@ -86,10 +97,14 @@ const HomeScreen = ({ navigation }: any) => {
8697
};
8798

8899
const styles = StyleSheet.create({
100+
scrollContainer: {
101+
marginVertical: 1,
102+
},
89103
container: {
90-
flex: 1,
91104
backgroundColor: "#fff",
105+
paddingBottom: 45,
92106
},
107+
93108
list: {
94109
paddingHorizontal: 17,
95110
backgroundColor: "#ffffff",
@@ -108,8 +123,6 @@ const styles = StyleSheet.create({
108123
shadowOpacity: 0.5,
109124
shadowRadius: 4,
110125
marginVertical: 8,
111-
// backgroundColor: "",
112-
// borderRadius: 12,
113126
},
114127
cardHeader: {
115128
paddingVertical: 17,

screens/LoginScreen.tsx

+14-3
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,15 @@ import {
88
ViewStyle,
99
Image,
1010
Dimensions,
11+
SafeAreaView,
12+
ScrollView,
1113
} from "react-native";
1214
import FontAwesome from "react-native-vector-icons/FontAwesome";
1315
import { AuthNavProps } from "../types/AuthParamList";
1416
import auth from "@react-native-firebase/auth";
1517
import { GoogleSignin } from "@react-native-google-signin/google-signin";
1618
import { AccessToken, LoginManager } from "react-native-fbsdk-next";
19+
import StatusBarHead from "../components/StatusBarHead";
1720

1821
const LoginScreen = ({ navigation }: AuthNavProps<"LoginScreen">) => {
1922
const [data, setdata] = useState({
@@ -97,7 +100,11 @@ const LoginScreen = ({ navigation }: AuthNavProps<"LoginScreen">) => {
97100
};
98101

99102
return (
100-
<View style={styles.container}>
103+
<ScrollView
104+
showsVerticalScrollIndicator={false}
105+
contentContainerStyle={styles.container}
106+
>
107+
<StatusBarHead />
101108
<View style={styles.header}>
102109
<Image source={require("../assets/logo.png")} style={styles.logo} />
103110
<Text style={styles.logoText}>Aviate Coders </Text>
@@ -147,7 +154,7 @@ const LoginScreen = ({ navigation }: AuthNavProps<"LoginScreen">) => {
147154
<Text style={[styles.redirectTextLink]}>Signup</Text>
148155
</TouchableOpacity>
149156
</View>
150-
</View>
157+
</ScrollView>
151158
);
152159
};
153160

@@ -266,18 +273,22 @@ const styles = StyleSheet.create<Styles>({
266273
fontSize: 18,
267274
fontFamily: "Adamina-Regular",
268275
color: "black",
276+
textAlign: "center",
277+
paddingRight: 5,
269278
},
270279
redirectTextLink: {
271280
fontSize: 18,
272281
fontFamily: "Adamina-Regular",
273282
color: "purple",
283+
paddingLeft: 1,
284+
274285
// fontWeight: "bold",
275286
},
276287
row: {
277288
flexDirection: "row",
278289
alignItems: "center",
279290
justifyContent: "space-between",
280-
width: "70%",
291+
// width: "70%",
281292
},
282293
});
283294

screens/ProfileScreen.tsx

+3
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ import {
1111
import auth from "@react-native-firebase/auth";
1212
import firestore from "@react-native-firebase/firestore";
1313
import { context } from "../state";
14+
import StatusBarHead from "../components/StatusBarHead";
1415

1516
interface ProfileScreenProps {}
1617

@@ -51,6 +52,7 @@ const ProfileScreen: React.FC<ProfileScreenProps> = ({}) => {
5152

5253
return (
5354
<View style={styles.container}>
55+
<StatusBarHead />
5456
{profile ? (
5557
<View>
5658
<Image
@@ -87,6 +89,7 @@ const styles = StyleSheet.create({
8789
flex: 1,
8890
alignItems: "center",
8991
justifyContent: "center",
92+
backgroundColor: "#fff",
9093
},
9194
redirectTextLink: {
9295
fontFamily: `Adamina-Regular`,

0 commit comments

Comments
 (0)