Skip to content

Commit f0c2066

Browse files
committed
🖌️ User Interface: added profile and bar icons in title
1 parent 9a541ab commit f0c2066

File tree

5 files changed

+166
-8
lines changed

5 files changed

+166
-8
lines changed

app/index.js

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
import { View, Text, ScrollView, SafeAreaView } from 'react-native'
2+
3+
import { COLORS, icons, images, SIZES } from '../constants'
4+
import { Nearbyjobs, Popularjobs, ScreenHeaderBtn, Welcome } from '../components'
5+
import { Stack, useRouter } from 'expo-router'
6+
7+
const Home = () => {
8+
const router = useRouter()
9+
return (
10+
<SafeAreaView style={{ flex: 1, backgroundColor: COLORS.lightWhite }}>
11+
<Stack.Screen options={{
12+
headerStyle: { backgroundColor: COLORS.lightWhite },
13+
headerShadowVisible: false,
14+
headerLeft: () => (
15+
<ScreenHeaderBtn iconUrl={icons.menu} dimension="60%" />
16+
),
17+
headerRight: () => (
18+
<ScreenHeaderBtn iconUrl={images.profile} dimension="100%" />
19+
),
20+
headerTitle: ""
21+
}} />
22+
<ScrollView showsVerticalScrollIndicator={false}>
23+
<View style={{
24+
flex: 1,
25+
padding: SIZES.medium
26+
}}>
27+
<Welcome />
28+
<Popularjobs />
29+
<Nearbyjobs />
30+
</View>
31+
</ScrollView>
32+
</SafeAreaView>
33+
);
34+
}
35+
36+
export default Home;
Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,18 @@
11
import React from 'react'
2-
import { View, Text } from 'react-native'
2+
import { View, Text, TouchableOpacity, Image } from 'react-native'
33

44
import styles from './screenheader.style'
55

6-
const ScreenHeaderBtn = () => {
6+
const ScreenHeaderBtn = ({iconUrl, dimension, handlePress}) => {
77
return (
8-
<View>
9-
<Text>ScreenHeaderBtn</Text>
10-
</View>
8+
<TouchableOpacity style={styles.btnContainer} onPress={handlePress}>
9+
<Image
10+
source={iconUrl}
11+
resizeMode='cover'
12+
style={styles.btnImg(dimension)}
13+
/>
14+
</TouchableOpacity>
1115
)
1216
}
1317

14-
export default ScreenHeaderBtn
18+
export default ScreenHeaderBtn;

components/home/welcome/Welcome.jsx

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import React from 'react'
2-
import { View, Text } from 'react-native'
2+
import { View, Text, TextInput, TouchableOpacity, Image, FlatList } from 'react-native'
3+
import {icons, SIZES} from '../../../constants'
34

45
import styles from './welcome.style'
56

@@ -11,4 +12,4 @@ const Welcome = () => {
1112
)
1213
}
1314

14-
export default Welcome
15+
export default Welcome

package-lock.json

Lines changed: 114 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,15 +6,18 @@
66
"web": "expo start --web"
77
},
88
"dependencies": {
9+
"axios": "^1.3.6",
910
"expo": "^48.0.7",
1011
"expo-constants": "~14.2.1",
12+
"expo-font": "^11.1.1",
1113
"expo-linking": "~4.0.1",
1214
"expo-router": "^1.2.0",
1315
"expo-splash-screen": "~0.18.1",
1416
"expo-status-bar": "~1.4.2",
1517
"react": "18.2.0",
1618
"react-dom": "18.2.0",
1719
"react-native": "0.71.3",
20+
"react-native-dotenv": "^3.4.8",
1821
"react-native-gesture-handler": "~2.9.0",
1922
"react-native-reanimated": "~2.14.4",
2023
"react-native-safe-area-context": "4.5.0",

0 commit comments

Comments
 (0)