-
Notifications
You must be signed in to change notification settings - Fork 0
/
App.js
48 lines (44 loc) · 1.27 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
import { NavigationContainer } from "@react-navigation/native";
import { CardStyleInterpolators } from "@react-navigation/stack";
import { StatusBar } from "expo-status-bar";
import { createSharedElementStackNavigator } from "react-navigation-shared-element";
import DetailPage from "./src/screens/DetailPage";
import Feeds from "./src/screens/Feeds";
import Profile from "./src/screens/Profile";
const Stack = createSharedElementStackNavigator();
const options = {
gestureEnabled: true,
transitionSpec: {
open: { animation: "timing", config: { duration: 300 } },
close: { animation: "timing", config: { duration: 300 } },
},
cardStyleInterpolator: ({ current: { progress } }) => {
return {
cardStyle: {
opacity: progress,
},
};
},
};
const MyStack = () => {
return (
<Stack.Navigator
screenOptions={{
headerMode: "none",
headerShown: false,
}}
>
<Stack.Screen name="Feeds" component={Feeds} />
<Stack.Screen name="Detail" component={DetailPage} options={options} />
<Stack.Screen name="Profile" component={Profile} />
</Stack.Navigator>
);
};
export default function App() {
return (
<NavigationContainer>
<StatusBar hidden />
<MyStack />
</NavigationContainer>
);
}