-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
356f0b3
commit da2cdbc
Showing
71 changed files
with
8,716 additions
and
4,824 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
import { Tabs } from 'expo-router' | ||
import React from 'react' | ||
import Ionicons from '@expo/vector-icons/Ionicons'; | ||
import { Colors } from './../../constants/Colors' | ||
|
||
const TabLayout = () => { | ||
return ( | ||
<Tabs screenOptions={{ | ||
headerShown: false, | ||
tabBarActiveTintColor: Colors.PRIMARY | ||
}}> | ||
<Tabs.Screen name='home' | ||
options={{ | ||
tabBarLabel: 'Home', | ||
tabBarIcon: ({ color }) => <Ionicons name="home" size={24} color={color} /> | ||
}} | ||
/> | ||
<Tabs.Screen name='explore' | ||
options={{ | ||
tabBarLabel: 'Explore', | ||
tabBarIcon: ({ color }) => <Ionicons name="search" size={24} color={color} /> | ||
}} /> | ||
<Tabs.Screen name='profile' | ||
options={{ | ||
tabBarLabel: 'Profile', | ||
tabBarIcon: ({ color }) => <Ionicons name="people-circle" size={24} color={color} /> | ||
}} /> | ||
</Tabs> | ||
) | ||
} | ||
|
||
export default TabLayout |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,71 @@ | ||
import { View, Text, TextInput } from 'react-native' | ||
import React, { useState } from 'react' | ||
import { Colors } from './../../constants/Colors' | ||
import Ionicons from '@expo/vector-icons/Ionicons'; | ||
import Category from './../../components/Home/Category' | ||
import { collection, getDocs, query, where } from 'firebase/firestore'; | ||
import { db } from '../../configs/FirebaseConfig'; | ||
import ExploreBusinessList from '../../components/Explore/ExploreBusinessList'; | ||
|
||
export default function explore() { | ||
|
||
const [businessList, setBusinessList] = useState([]); | ||
|
||
const GetBusinessByCategory = async (category) => { | ||
setBusinessList([]); | ||
const q = query(collection(db, 'BusinessList'), where('category', '==', category)) | ||
const querySnapshot = await getDocs(q); | ||
querySnapshot.forEach((doc) => { | ||
console.log(doc.data()) | ||
setBusinessList(prev => [...prev, { id: doc.id, ...doc.data() }]) | ||
}) | ||
} | ||
|
||
return ( | ||
<View style={{ | ||
padding: 20, | ||
marginTop: 26 | ||
}}> | ||
<Text style={{ | ||
fontFamily: 'outfit-bold', | ||
fontSize: 30 | ||
}}>explore more</Text> | ||
{/* Search Bar */} | ||
<View style={{ | ||
display: 'flex', | ||
flexDirection: 'row', | ||
gap: 10, | ||
alignItems: 'center', | ||
backgroundColor: '#fff', | ||
padding: 10, | ||
marginVertical: 10, | ||
marginTop: 15, | ||
borderRadius: 8, | ||
borderWidth: 1, | ||
borderColor: Colors.PRIMARY | ||
}}> | ||
<Ionicons name="search" size={24} color={Colors.PRIMARY} /> | ||
<TextInput placeholder='Search...' placeholderTextColor={Colors.GRAY} | ||
style={{ | ||
fontFamily: 'outfit', | ||
fontSize: 16, | ||
}} | ||
/> | ||
</View> | ||
|
||
{/* Category */} | ||
<View style={{ | ||
marginTop: 15, | ||
marginLeft: -20 | ||
}}> | ||
<Category | ||
explore={true} | ||
onCategorySelect={(category) => GetBusinessByCategory(category)} | ||
/> | ||
</View> | ||
|
||
{/* Business List */} | ||
<ExploreBusinessList businessList={businessList} /> | ||
</View> | ||
) | ||
} |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
import { View, Text, ScrollView } from 'react-native' | ||
import React from 'react' | ||
import Header from '../../components/Home/Header' | ||
import Slider from '../../components/Home/Slider' | ||
import Category from '../../components/Home/Category' | ||
import PopularBusiness from '../../components/Home/PopularBusiness' | ||
|
||
export default function home() { | ||
return ( | ||
<ScrollView> | ||
{/* Header */} | ||
<Header /> | ||
{/* Slider */} | ||
<Slider /> | ||
{/* Category */} | ||
<Category /> | ||
{/* Popular Business List */} | ||
<PopularBusiness /> | ||
|
||
<View style={{ height: 50 }}></View> | ||
</ScrollView> | ||
) | ||
} |
Oops, something went wrong.