Skip to content

Commit 74d36cc

Browse files
Aldiyar BatyrbekovAldiyar Batyrbekov
Aldiyar Batyrbekov
authored and
Aldiyar Batyrbekov
committed
cloning airbnb explore page
0 parents  commit 74d36cc

16 files changed

+6122
-0
lines changed

.expo-shared/assets.json

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
{
2+
"f9155ac790fd02fadcdeca367b02581c04a353aa6d5aa84409a59f6804c87acd": true,
3+
"89ed26367cdb9b771858e026f2eb95bfdb90e5ae943e716575327ec325f39c44": true
4+
}

.gitignore

+14
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
node_modules/**/*
2+
.expo/*
3+
npm-debug.*
4+
*.jks
5+
*.p8
6+
*.p12
7+
*.key
8+
*.mobileprovision
9+
*.orig.*
10+
web-build/
11+
web-report/
12+
13+
# macOS
14+
.DS_Store

App.js

+86
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,86 @@
1+
import * as React from "react";
2+
import { StyleSheet, Text, View, Image } from "react-native";
3+
import { NavigationContainer } from "@react-navigation/native";
4+
import { createBottomTabNavigator } from "@react-navigation/bottom-tabs";
5+
import { Ionicons, AntDesign } from "@expo/vector-icons";
6+
import Explore from "./screens/Explore";
7+
import Inbox from "./screens/Inbox";
8+
import Saved from "./screens/Saved";
9+
import Trips from "./screens/Trips";
10+
import Profile from "./screens/Profile";
11+
12+
const Tab = createBottomTabNavigator();
13+
14+
export default function App() {
15+
return (
16+
<NavigationContainer>
17+
<Tab.Navigator
18+
initialRouteName="Explore"
19+
tabBarOptions={{ activeTintColor: "#FF5A5F" }}
20+
>
21+
<Tab.Screen
22+
name="Explore"
23+
component={Explore}
24+
options={{
25+
title: "EXPLORE",
26+
tabBarIcon: ({ color }) => (
27+
<Ionicons name="ios-search" size={24} color={color} />
28+
)
29+
}}
30+
/>
31+
<Tab.Screen
32+
name="Saved"
33+
component={Saved}
34+
options={{
35+
title: "SAVED",
36+
tabBarIcon: ({ color }) => (
37+
<Ionicons name="ios-heart" size={24} color={color} />
38+
)
39+
}}
40+
/>
41+
<Tab.Screen
42+
name="Trips"
43+
component={Trips}
44+
options={{
45+
title: "TRIPS",
46+
tabBarIcon: ({ color }) => (
47+
<Image
48+
source={require("./assets/airbnb.png")}
49+
style={{ height: 24, width: 24, tintColor: color }}
50+
/>
51+
)
52+
}}
53+
/>
54+
<Tab.Screen
55+
name="Inbox"
56+
component={Inbox}
57+
options={{
58+
title: "INBOX",
59+
tabBarIcon: ({ color }) => (
60+
<Ionicons name="ios-chatbubbles" size={24} color={color} />
61+
)
62+
}}
63+
/>
64+
<Tab.Screen
65+
name="Profile"
66+
component={Profile}
67+
options={{
68+
title: "PROFILE",
69+
tabBarIcon: ({ color }) => (
70+
<AntDesign name="user" size={24} color={color} />
71+
)
72+
}}
73+
/>
74+
</Tab.Navigator>
75+
</NavigationContainer>
76+
);
77+
}
78+
79+
const styles = StyleSheet.create({
80+
container: {
81+
flex: 1,
82+
backgroundColor: "#fff",
83+
alignItems: "center",
84+
justifyContent: "center"
85+
}
86+
});

app.json

+30
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
{
2+
"expo": {
3+
"name": "Blank Template",
4+
"slug": "dribbleprojectclone",
5+
"privacy": "public",
6+
"sdkVersion": "36.0.0",
7+
"platforms": [
8+
"ios",
9+
"android",
10+
"web"
11+
],
12+
"version": "1.0.0",
13+
"orientation": "portrait",
14+
"icon": "./assets/icon.png",
15+
"splash": {
16+
"image": "./assets/splash.png",
17+
"resizeMode": "contain",
18+
"backgroundColor": "#ffffff"
19+
},
20+
"updates": {
21+
"fallbackToCacheTimeout": 0
22+
},
23+
"assetBundlePatterns": [
24+
"**/*"
25+
],
26+
"ios": {
27+
"supportsTablet": true
28+
}
29+
}
30+
}

assets/airbnb.png

3.25 KB
Loading

assets/icon.png

1.07 KB
Loading

assets/splash.png

7.01 KB
Loading

babel.config.js

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
module.exports = function(api) {
2+
api.cache(true);
3+
return {
4+
presets: ['babel-preset-expo'],
5+
};
6+
};

components/Category.js

+52
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
import React from "react";
2+
import { View, Text, Image, StyleSheet } from "react-native";
3+
import { TouchableOpacity } from "react-native-gesture-handler";
4+
5+
const Category = props => {
6+
return (
7+
<TouchableOpacity>
8+
<View style={styles.categoryCard}>
9+
<View style={styles.categoryImage}>
10+
<Image
11+
source={{
12+
uri: props.category.imageUri
13+
}}
14+
style={{ width: "100%", height: "100%" }}
15+
/>
16+
</View>
17+
<View style={{ flex: 1 }}>
18+
<Text style={styles.categoryText}>{props.category.name}</Text>
19+
</View>
20+
</View>
21+
</TouchableOpacity>
22+
);
23+
};
24+
25+
const styles = StyleSheet.create({
26+
categoryCard: {
27+
width: 150,
28+
height: 150,
29+
marginLeft: 20,
30+
borderRadius: 10,
31+
backgroundColor: "#ffffff",
32+
shadowOffset: {
33+
height: 0,
34+
width: 0
35+
},
36+
shadowColor: "#000000",
37+
shadowOpacity: 0.1,
38+
shadowRadius: 10,
39+
elevation: 1
40+
},
41+
categoryImage: {
42+
flex: 3,
43+
overflow: "hidden",
44+
borderTopLeftRadius: 8,
45+
borderTopRightRadius: 8
46+
},
47+
categoryText: {
48+
padding: 8
49+
}
50+
});
51+
52+
export default Category;

package.json

+31
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
{
2+
"main": "node_modules/expo/AppEntry.js",
3+
"scripts": {
4+
"start": "expo start",
5+
"android": "expo start --android",
6+
"ios": "expo start --ios",
7+
"web": "expo start --web",
8+
"eject": "expo eject"
9+
},
10+
"dependencies": {
11+
"@react-native-community/masked-view": "0.1.5",
12+
"@react-navigation/bottom-tabs": "^5.2.4",
13+
"@react-navigation/native": "^5.1.3",
14+
"@react-navigation/stack": "^5.2.7",
15+
"expo": "~36.0.0",
16+
"react": "~16.9.0",
17+
"react-dom": "~16.9.0",
18+
"react-native": "https://github.com/expo/react-native/archive/sdk-36.0.0.tar.gz",
19+
"react-native-gesture-handler": "~1.5.0",
20+
"react-native-reanimated": "~1.4.0",
21+
"react-native-safe-area-context": "0.6.0",
22+
"react-native-screens": "2.0.0-alpha.12",
23+
"react-native-web": "~0.11.7",
24+
"react-navigation": "^4.3.3"
25+
},
26+
"devDependencies": {
27+
"@babel/core": "^7.0.0",
28+
"babel-preset-expo": "~8.0.0"
29+
},
30+
"private": true
31+
}

0 commit comments

Comments
 (0)