-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathApp.js
338 lines (298 loc) · 11 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
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
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
import { Root } from 'native-base';
import * as React from 'react';
import { StatusBar } from 'expo-status-bar';
import { NavigationContainer } from '@react-navigation/native';
import { createStackNavigator } from '@react-navigation/stack';
import { StyleSheet, View } from 'react-native';
import { Asset } from 'expo-asset';
import { AppLoading } from 'expo';
// import { Container, Text } from 'native-base';
import * as Font from 'expo-font';
import { Ionicons } from '@expo/vector-icons';
import MYSLT from './app/index';
import RegPage from './app/registration';
import MainUI from './app/MainUI'
import Profile from './app/Profile'
import Manage from './app/Manage'
import History from './app/History'
import Promotions from './app/Promotions'
import PasswordchangeVisal from './app/PasswordchangeVisal'
import Promocode from './app/Promocode'
import FreeUsageChart from './app/FreeUsageChart'
import AddOnUsageChart from './app/AddOnUsageChart'
import AddMoreData from './app/AddMoreData'
import TotalUsageChart from './app/TotalUsageChart'
import ContactInfoChange from './app/ContactInfoChange'
import ViewDailyUsage from './app/ViewDailyUsage'
import MoreAddsHansi from './app/MoreAddsHansi'
import Selectregtype from './app/Selectregtype'
import Bonusdatausage from './app/Bonusdatausage'
import ExtraGB from './app/ExtraGBusage'
import MyProfile from './app/MyProfile'
import Accsettings from './app/AccountSettings'
import PurchaseHistory from './app/PurchaseHistory'
import AddNewUser from './app/AddNewUser'
import Giftdata from './app/GiftData'
import DataAddOns from './app/DataAddOns'
import Entertainment from './app/Entertainment'
const Stack = createStackNavigator()
function cacheImages(images) {
return images.map(image => {
if (typeof image === 'string') {
return Image.prefetch(image);
} else {
return Asset.fromModule(image).downloadAsync();
}
});
}
//const Stack = createStackNavigator();
class App extends React.Component {
constructor() {
super()
this.state = {
isReady: false
}
}
async componentDidMount() {
await Font.loadAsync({
Roboto: require('native-base/Fonts/Roboto.ttf'),
Roboto_medium: require('native-base/Fonts/Roboto_medium.ttf'),
...Ionicons.font,
});
this.setState({ isReady: true });
}
async _loadAssetsAsync() {
const imageAssets = cacheImages([
require('./assets/bg.jpg'),
]);
await Promise.all([...imageAssets]);
}
render() {
if (!this.state.isReady) {
return (
<AppLoading
startAsync={this._loadAssetsAsync}
onFinish={() => this.setState({ isReady: true })}
onError={console.warn}
/>
);
}
return (
<Root>
<NavigationContainer>
<Stack.Navigator initialRouteName="MYSLT">
<Stack.Screen name="MYSLT"
component={MYSLT}
options={{ headerShown: false }} />
<Stack.Screen name="RegPage"
component={RegPage}
options={{ headerShown: false }} />
<Stack.Screen name="MainUI"
component={MainUI}
options={{
headerShown: true,
headerStyle: { backgroundColor: '#009eff' },
headerTitleStyle: { color: '#ffffff', left: 40, right: 40 },
title: 'Usage Summary'
}} />
<Stack.Screen name="Profile"
component={Profile}
options={{
headerShown: true,
headerStyle: { backgroundColor: '#009eff' },
headerTitleStyle: { color: '#ffffff', left: 105, right: 80 },
title: 'Profile'
}} />
<Stack.Screen name="Manage"
component={Manage}
options={{
headerShown: true,
headerStyle: { backgroundColor: '#009eff' },
headerTitleStyle: { color: '#ffffff', left: 80, right: 80 },
title: 'Manage'
}} />
<Stack.Screen name="History"
component={History}
options={{
headerShown: false
}} />
<Stack.Screen name="Promotions"
component={Promotions}
options={{
headerShown: true,
headerStyle: { backgroundColor: '#009eff' },
headerTitleStyle: { color: '#ffffff', left: 80, right: 60 },
title: 'Promotions'
}} />
<Stack.Screen name="PasswordchangeVisal"
component={PasswordchangeVisal}
options={{
headerShown: true,
headerStyle: { backgroundColor: '#009eff' },
headerTitleStyle: { color: '#ffffff', left: 30, right: 30 },
title: 'Change Password'
}} />
<Stack.Screen name="Promocode"
component={Promocode}
options={{
headerShown: true,
headerStyle: { backgroundColor: '#009eff' },
headerTitleStyle: { color: '#ffffff', left: 50, right: 50 },
title: 'Promo Code'
}} />
<Stack.Screen name="FreeUsageChart"
component={FreeUsageChart}
options={{
headerShown: true,
headerStyle: { backgroundColor: '#009eff' },
headerTitleStyle: { color: '#ffffff', left: 40, right: 40 },
title: 'Free Data Usage'
}} />
<Stack.Screen name="AddOnUsageChart"
component={AddOnUsageChart}
options={{
headerShown: true,
headerStyle: { backgroundColor: '#009eff' },
headerTitleStyle: { color: '#ffffff', left: 50, right: 50 },
title: 'Add on Usage'
}} />
<Stack.Screen name="AddMoreData"
component={AddMoreData}
options={{
headerShown: true,
headerStyle: { backgroundColor: '#009eff' },
headerTitleStyle: { color: '#ffffff', left: 40, right: 40 },
title: 'Add More Data'
}} />
<Stack.Screen name="TotalUsageChart"
component={TotalUsageChart}
options={{ headerShown: false }}
/>
<Stack.Screen name="ContactInfoChange"
component={ContactInfoChange}
options={{
headerShown: true,
headerStyle: { backgroundColor: '#009eff' },
headerTitleStyle: { color: '#ffffff', left: 50, right: 50 },
title: 'Change Contact Info'
}}
/>
<Stack.Screen name="ViewDailyUsage"
component={ViewDailyUsage}
options={{
headerShown: true,
headerStyle: { backgroundColor: '#009eff' },
headerTitleStyle: { color: '#ffffff', left: 60, right: 60 },
title: 'Daily Usage'
}} />
<Stack.Screen name="Selectregtype"
component={Selectregtype}
options={{ headerShown: false }}
/>
<Stack.Screen name="Bonusdatausage"
component={Bonusdatausage}
options={{
headerShown: true,
headerStyle: { backgroundColor: '#009eff' },
headerTitleStyle: { color: '#ffffff', left: 40, right: 40 },
title: 'Bonus Data Usage'
}}
/>
<Stack.Screen name="MoreAddsHansi"
component={MoreAddsHansi}
options={{
headerShown: true,
headerStyle: { backgroundColor: '#009eff' },
headerTitleStyle: { color: '#ffffff', left: 50, right: 50 },
title: 'Advertisments'
}}
/>
<Stack.Screen name="ExtraGB"
component={ExtraGB}
options={{
headerShown: true,
headerStyle: { backgroundColor: '#009eff' },
headerTitleStyle: { color: '#ffffff', left: 90, right: 70 },
title: 'Extra GB'
}}
/>
<Stack.Screen name="MyProfile"
component={MyProfile}
options={{
headerShown: true,
headerStyle: { backgroundColor: '#009eff' },
headerTitleStyle: { color: '#ffffff', left: 85, right: 70 },
title: 'My Profile'
}}
/>
<Stack.Screen name="Accsettings"
component={Accsettings}
options={{
headerShown: true,
headerStyle: { backgroundColor: '#009eff' },
headerTitleStyle: { color: '#ffffff', left: 55, right: 40 },
title: 'Account Settings'
}}
/>
<Stack.Screen name="PurchaseHistory"
component={PurchaseHistory}
options={{
headerShown: true,
headerStyle: { backgroundColor: '#009eff' },
headerTitleStyle: { color: '#ffffff', left: 40, right: 40 },
title: 'Purchase HIstory'
}}
/>
<Stack.Screen name="AddNewUser"
component={AddNewUser}
options={{
headerShown: true,
headerStyle: { backgroundColor: '#009eff' },
headerTitleStyle: { color: '#ffffff', left: 65, right: 50 },
title: 'Add New User'
}}
/>
<Stack.Screen name="Giftdata"
component={Giftdata}
options={{
headerShown: true,
headerStyle: { backgroundColor: '#009eff' },
headerTitleStyle: { color: '#ffffff', left: 90, right: 70 },
title: 'Gift Data'
}}
/>
<Stack.Screen name="DataAddOns"
component={DataAddOns}
options={{
headerShown: true,
headerStyle: { backgroundColor: '#009eff' },
headerTitleStyle: { color: '#ffffff', left: 70, right: 40 },
title: 'Data Add-ons'
}}
/>
<Stack.Screen name="Entertainment"
component={Entertainment}
options={{
headerShown: true,
headerStyle: { backgroundColor: '#009eff' },
headerTitleStyle: { color: '#ffffff', left: 70, right: 60 },
title: 'Entertainment'
}}
/>
{/* <Stack.Screen name="UsageSummary" component={UsageSummary} />
<Stack.Screen name="BottomNavigation" component={BottomNavigation} /> */}
</Stack.Navigator>
</NavigationContainer>
</Root>
)
}
}
export default App;
const styles = StyleSheet.create({
container: {
flex: 1,
backgroundColor: '#fff',
alignItems: 'center',
justifyContent: 'center',
},
});