-
Notifications
You must be signed in to change notification settings - Fork 0
/
App.tsx
28 lines (25 loc) · 867 Bytes
/
App.tsx
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
import React from 'react'
import { NavigationContainer } from '@react-navigation/native'
import { createSharedElementStackNavigator } from 'react-navigation-shared-element'
import { SnapchatRoutes } from './Model'
import Story from './Story'
import Snapchat from './Snapchat'
const Stack = createSharedElementStackNavigator <SnapchatRoutes>()
const Navigator = () => (
<NavigationContainer>
<Stack.Navigator
screenOptions={{
gestureEnabled: false,
headerShown: false,
cardOverlayEnabled: true,
cardStyle: { backgroundColor: "transparent" },
}}
>
<Stack.Screen name="Snapchat" component={Snapchat}/>
<Stack.Screen name="Story" component={Story} sharedElements={(route) => {
return [route.params.story.id]
}} />
</Stack.Navigator>
</NavigationContainer>
)
export default Navigator