Skip to content

Commit ff22ac4

Browse files
committed
Few improvement
1 parent 21209d4 commit ff22ac4

File tree

9 files changed

+3665
-2625
lines changed

9 files changed

+3665
-2625
lines changed

app/assets/images/bg1.jpg

-13.5 KB
Binary file not shown.

app/assets/images/bg2.jpg

-97.7 KB
Binary file not shown.

app/assets/images/bg3.jpg

-74.9 KB
Binary file not shown.

app/assets/images/splash.png

-319 KB
Binary file not shown.

app/components/SearchBar.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import React from 'react';
2-
import { View, StyleSheet, Text, TouchableOpacity } from 'react-native';
2+
import { View, StyleSheet, Text, TouchableOpacity, Alert } from 'react-native';
33
import tailwind from 'tailwind-react-native-classnames';
44
import { GooglePlacesAutocomplete } from 'react-native-google-places-autocomplete'
55
import { Ionicons } from '@expo/vector-icons';
@@ -17,9 +17,9 @@ const SearchBar = ({ setCity, city }) => {
1717
minLength={2}
1818
fetchDetails={true}
1919
returnKeyType={"search"}
20-
onFail={error => console.error(error)}
20+
onFail={error => Alert.alert('Worning', error)}
2121
query={{
22-
key: "GOOGLE_MAP_APIKEY",
22+
key: "",
2323
language: 'en',
2424
}}
2525
styles={{

app/navigation/AppNavigator.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@ import { loginUser, logoutUser, selectUser } from '../redux/slices/authSlice';
55
import AuthNavigator from './AuthNavigator';
66
import { auth } from '../configs/firebase';
77
import HomeNavigator from './HomeNavigator';
8+
import { LogBox } from 'react-native';
9+
LogBox.ignoreLogs(['new NativeEventEmitter']);
810

911
export default function AppNavigator() {
1012
const user = useSelector(selectUser)

app/screens/HomeScreen.js

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ import tailwind from 'tailwind-react-native-classnames';
99
import { localRestaurants } from '../data/localRestaurants';
1010
import colors from '../configs/colors'
1111

12-
const YELP_API_KEY = "YELP_API_KEY";
12+
const YELP_API_KEY = "";
1313

1414
const HomeScreen = () => {
1515
const [restaurantData, setRestaurantData] = useState(localRestaurants)
@@ -30,17 +30,18 @@ const HomeScreen = () => {
3030
.then((res) => res.json())
3131
.then((json) => {
3232
setLoading(false)
33-
if(json.error) return Alert.alert('Sorry', json.error.description);
33+
if (json.error) return Alert.alert('Sorry', json.error.description);
3434
setRestaurantData(
3535
json?.businesses?.filter((business) =>
3636
business.transactions.includes(activeTab.toLowerCase())
3737
)
3838
)
39-
}
40-
);
39+
})
40+
.catch((err) => console.log(err));
4141
};
4242

4343
useEffect(() => {
44+
return // Remove return after adding Yelp API key
4445
getRestaurantsFromYelp();
4546
}, [city, activeTab]);
4647

package.json

Lines changed: 22 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -8,33 +8,34 @@
88
"eject": "expo eject"
99
},
1010
"dependencies": {
11-
"@expo/vector-icons": "^12.0.5",
12-
"@react-navigation/bottom-tabs": "^6.0.5",
13-
"@react-navigation/native": "^6.0.2",
14-
"@react-navigation/stack": "^6.0.7",
15-
"@reduxjs/toolkit": "^1.6.1",
16-
"@stripe/stripe-react-native": "0.1.4",
17-
"expo": "^42.0.3",
18-
"expo-google-app-auth": "^8.2.2",
19-
"expo-status-bar": "~1.0.4",
20-
"firebase": "8.2.3",
11+
"@expo/vector-icons": "^13.0.0",
12+
"@react-navigation/bottom-tabs": "^6.3.2",
13+
"@react-navigation/native": "^6.0.11",
14+
"@react-navigation/stack": "^6.2.2",
15+
"@reduxjs/toolkit": "^1.8.3",
16+
"@stripe/stripe-react-native": "0.6.1",
17+
"expo": "^45.0.0",
18+
"expo-google-app-auth": "~8.3.0",
19+
"expo-status-bar": "~1.3.0",
20+
"firebase": "8.8.0",
2121
"formik": "^2.2.9",
2222
"install": "^0.13.0",
23-
"react": "16.13.1",
24-
"react-dom": "16.13.1",
25-
"react-native": "https://github.com/expo/react-native/archive/sdk-42.0.0.tar.gz",
26-
"react-native-bouncy-checkbox": "^2.1.4",
27-
"react-native-dotenv": "^3.2.0",
28-
"react-native-gesture-handler": "~1.10.2",
23+
"react": "17.0.2",
24+
"react-dom": "17.0.2",
25+
"react-native": "0.68.2",
26+
"react-native-bouncy-checkbox": "^3.0.2",
27+
"react-native-dotenv": "^3.3.1",
28+
"react-native-gesture-handler": "~2.2.1",
2929
"react-native-google-places-autocomplete": "^2.4.1",
30-
"react-native-maps": "0.28.0",
31-
"react-native-web": "~0.13.12",
32-
"react-redux": "^7.2.5",
30+
"react-native-maps": "0.30.2",
31+
"react-native-safe-area-context": "4.2.4",
32+
"react-native-web": "0.17.7",
33+
"react-redux": "^8.0.2",
3334
"tailwind-react-native-classnames": "^1.5.1",
34-
"yup": "^0.32.9"
35+
"yup": "^0.32.11"
3536
},
3637
"devDependencies": {
37-
"@babel/core": "^7.9.0"
38+
"@babel/core": "^7.12.9"
3839
},
3940
"private": true
4041
}

0 commit comments

Comments
 (0)