-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathApp.tsx
More file actions
78 lines (73 loc) · 2.05 KB
/
App.tsx
File metadata and controls
78 lines (73 loc) · 2.05 KB
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
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
import React from 'react';
import {NavigationContainer} from '@react-navigation/native';
import {createStackNavigator} from '@react-navigation/stack';
import HomeScreen from './src/screens/HomeScreen';
import InputScreen from './src/screens/InputScreen';
import PaymentScreen from './src/screens/PaymentScreen';
import PinScreen from './src/screens/PinScreen';
import ConfirmationScreen from './src/screens/ConfirmationScreen';
import TapScreen from './src/screens/TapScreen';
import {GestureHandlerRootView} from 'react-native-gesture-handler';
export type readNFCType = {
typeName: string;
aid0: string;
aid1: string;
cardNumber: string;
expireDate: string;
};
export type RootStackParamList = {
Home: undefined;
Input: undefined;
Tap: {amount: string};
Payment: {amount: string; data: readNFCType};
Pin: {};
Confirmation: {};
};
const Stack = createStackNavigator<RootStackParamList>();
const App = () => {
return (
<GestureHandlerRootView style={{flex: 1}}>
<NavigationContainer>
<Stack.Navigator initialRouteName="Home">
<Stack.Screen
name="Home"
component={HomeScreen}
options={{
title: '',
}}
/>
<Stack.Screen
name="Input"
component={InputScreen}
options={{
title: 'Charge',
}}
/>
<Stack.Screen
name="Payment"
component={PaymentScreen}
options={{
title: 'Confirm Payment',
}}
/>
<Stack.Screen
name="Pin"
component={PinScreen}
options={{
title: 'Pin',
}}
/>
<Stack.Screen
name="Tap"
component={TapScreen}
options={{
title: 'Tap To Pay',
}}
/>
<Stack.Screen name="Confirmation" component={ConfirmationScreen} />
</Stack.Navigator>
</NavigationContainer>
</GestureHandlerRootView>
);
};
export default App;