-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.js
63 lines (59 loc) · 1.95 KB
/
index.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
import { useState,useEffect } from "react";
import { View , Text, ScrollView, SafeAreaView} from "react-native";
import {Stack, useRouter} from 'expo-router';
import { COLORS , icons , images , SIZES} from '../constants';
import {NearbyJobCard, Nearbyjobs, Popularjobs, ScreenHeaderBtn, Welcome} from '../components'
import Divider from "../components/common/Divider.js/Divider";
import ShortDivider from "../components/common/ShortDivider/ShortDivider";
import DishDetails from "../components/home/DishDetails/DishDetails";
const Home =()=>{
const router = useRouter();
const [showSelectD, setShowSelectD] = useState(true);
const headerTitle = showSelectD ? 'Select Dishes' : '';
return (
<SafeAreaView style={{ flex: 1, backgroundColor: 'white' }}>
<Stack.Screen
options={{
headerStyle: { backgroundColor: COLORS.lightWhite },
headerShadowVisible: false,
headerLeft: () => (
<ScreenHeaderBtn
iconUrl={icons.arrow}
dimensions="100%"
setShowSelectD={setShowSelectD}
/>
),
headerTitle: headerTitle,
}}
/>
<ScrollView showsVerticalScrollIndicator={false}>
{showSelectD ? (
<View>
<View style={{ flex: 1, padding: 42 }}>
<Welcome />
</View>
<View>
<Popularjobs />
</View>
<View>
<Nearbyjobs />
<Divider />
</View>
<View>
<NearbyJobCard
setShowSelectD={setShowSelectD}
showSelectD={showSelectD}
// data={data}
/>
</View>
</View>
) : (
<View>
<DishDetails />
</View>
)}
</ScrollView>
</SafeAreaView>
);
}
export default Home;