-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathApp.js
57 lines (54 loc) · 1.51 KB
/
App.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
import "react-native-gesture-handler";
import React from "react";
import { Platform } from "react-native";
import { NavigationContainer } from "@react-navigation/native";
import { createStackNavigator } from "@react-navigation/stack";
import Details from "./screens/Details";
import Home from "./screens/Home";
import { CardStyleInterpolators } from "@react-navigation/stack";
const data = [
{ id: 1, el: 1 },
{ id: 2, el: 2 },
{ id: 3, el: 3 },
{ id: 4, el: 4 },
{ id: 5, el: 5 },
{ id: 6, el: 6 },
{ id: 7, el: 7 },
{ id: 8, el: 8 },
{ id: 9, el: 9 },
{ id: 10, el: 10 },
{ id: 11, el: 11 },
{ id: 12, el: 12 },
{ id: 13, el: 13 },
{ id: 14, el: 14 },
{ id: 15, el: 15 },
];
const Stack = createStackNavigator();
export default function App() {
return (
<NavigationContainer>
<Stack.Navigator initialRouteName="Home">
<Stack.Screen
name="Home"
component={Home}
options={{
cardStyleInterpolator:
Platform.OS === "android"
? CardStyleInterpolators.forNoAnimation
: CardStyleInterpolators.forHorizontalIOS,
}}
/>
<Stack.Screen
name="Details"
component={Details}
options={{
cardStyleInterpolator:
Platform.OS === "android"
? CardStyleInterpolators.forNoAnimation
: CardStyleInterpolators.forHorizontalIOS,
}}
/>
</Stack.Navigator>
</NavigationContainer>
);
}