Skip to content

Commit

Permalink
initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
PranavArya37 committed Sep 17, 2024
1 parent 356f0b3 commit da2cdbc
Show file tree
Hide file tree
Showing 71 changed files with 8,716 additions and 4,824 deletions.
7 changes: 7 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,13 @@ npm-debug.*
*.mobileprovision
*.orig.*
web-build/
.env

# macOS
.DS_Store

# @generated expo-cli sync-2b81b286409207a5da26e14c78851eb30d8ccbdb
# The following patterns were generated by expo-cli

expo-env.d.ts
# @end expo-cli
50 changes: 0 additions & 50 deletions README.md

This file was deleted.

32 changes: 29 additions & 3 deletions app.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
{
"expo": {
"name": "business-directory",
"name": "Business Directory",
"slug": "business-directory",
"privacy": "public",
"description": "Find your favourite business near your and post your own business to your community",
"version": "1.0.0",
"orientation": "portrait",
"icon": "./assets/images/icon.png",
Expand All @@ -19,18 +21,42 @@
"adaptiveIcon": {
"foregroundImage": "./assets/images/adaptive-icon.png",
"backgroundColor": "#ffffff"
}
},
"permissions": [
"android.permission.RECORD_AUDIO"
],
"package": "com.pranavarya.businessdirectory"
},
"web": {
"bundler": "metro",
"output": "static",
"favicon": "./assets/images/favicon.png"
},
"plugins": [
"expo-router"
"expo-router",
[
"expo-image-picker",
{
"photosPermission": "The app accesses your photos to let you share them with your friends."
}
]
],
"experiments": {
"typedRoutes": true
},
"extra": {
"router": {
"origin": false
},
"eas": {
"projectId": "8bf58931-6a6c-45b2-84f4-0cca9a76973d"
}
},
"runtimeVersion": {
"policy": "appVersion"
},
"updates": {
"url": "https://u.expo.dev/8bf58931-6a6c-45b2-84f4-0cca9a76973d"
}
}
}
32 changes: 32 additions & 0 deletions app/(tabs)/_layout.jsx
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
37 changes: 0 additions & 37 deletions app/(tabs)/_layout.tsx

This file was deleted.

71 changes: 71 additions & 0 deletions app/(tabs)/explore.jsx
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>
)
}
102 changes: 0 additions & 102 deletions app/(tabs)/explore.tsx

This file was deleted.

23 changes: 23 additions & 0 deletions app/(tabs)/home.jsx
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>
)
}
Loading

0 comments on commit da2cdbc

Please sign in to comment.