-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathrouter.js
113 lines (110 loc) · 3.08 KB
/
router.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
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
import React, { Component } from 'react';
import { Router, Scene, Actions } from 'react-native-router-flux';
import Cam from './src/Components/Cam';
import Complete from './src/Components/RecordingComplete';
import Dashboard from './src/Components/Dashboard';
import Login from './src/Components/Login';
import ImportAccount from './src/Components/ImportAccount';
import AccountCreated from './src/Components/AccountCreated';
import MyStore from './src/Components/MyStore'
import VideoPlayer from './src/Components/VideoPlayer'
import TransferOwnership from './src/Components/TransferOwnership';
import LinkEmail from './src/Components/LinkEmail';
const img = require('./src/AppAssets/timer.png');
import { AsyncStorage } from 'react-native'
import SendMail from './src/Components/SendMail';
import PendingRequests from './src/Components/PendingRequests';
const MyRouter = () => {
return (
<Router>
<Scene key="root">
<Scene key="login"
component={Login}
title="Login"
// hideNavBar
initial
/>
<Scene key="mystore"
component={MyStore}
title="My Store"
// hideNavBar
// initial
/>
<Scene key="link"
component={LinkEmail}
title="Link Email"
// hideNavBar
// initial
/>
<Scene key="transfer"
component={TransferOwnership}
title="Transfer Ownership"
// hideNavBar
// initial
/>
<Scene key="pendingrequests"
component={PendingRequests}
title="Pending Requests"
// hideNavBar
// initial
/>
<Scene key="videoplayer"
component={VideoPlayer}
title="Player"
// hideNavBar
// initial
/>
<Scene key="importAccount"
component={ImportAccount}
title="Import Account"
// hideNavBar
// initial
/>
<Scene key="created"
component={AccountCreated}
title="Account Created"
// hideNavBar
// initial
/>
<Scene key="video"
component={Cam}
hideNavBar
// initial
/>
<Scene key="sendmail"
component={SendMail}
title = "Send Email"
// hideNavBar
// initial
/>
<Scene key="dashboard"
component={Dashboard}
title="Dashboard"
rightTitle="Logout"
// rightButtonImage = {img}
onRight={async () => {
console.log('right');
try {
console.log('trying');
AsyncStorage.setItem('wallet', '').then(() => {
console.log('returning');
Actions.reset('login');
})
} catch (err) {
console.log(err);
}
}}
// hideNavBar
// initial
/>
<Scene key="complete"
component={Complete}
title="Recording Complete"
// hideNavBar
// initial
/>
</Scene>
</Router>
);
}
export default MyRouter;