-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathApp.js
More file actions
106 lines (99 loc) · 2.9 KB
/
App.js
File metadata and controls
106 lines (99 loc) · 2.9 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
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
/**
* Sample React Native App
* https://github.com/facebook/react-native
*
* @format
* @flow strict-local
*/
import React, { useEffect } from 'react';
import type { Node } from 'react';
import {
Image,
} from 'react-native';
import { NavigationContainer } from '@react-navigation/native';
import { createNativeStackNavigator } from '@react-navigation/native-stack';
import 'node-libs-react-native/globals';
import 'react-native-get-random-values';
import 'react-native-url-polyfill/auto';
import { FontAwesomeIcon } from '@fortawesome/react-native-fontawesome'
import { faEdit } from '@fortawesome/free-regular-svg-icons'
import LottieView from 'lottie-react-native';
import Welcome from './src/components/Welcome'
import Splash from './src/components/Splash'
import Login from './src/components/Login'
import Callback from './src/components/Callback'
import Chat from './src/components/Chat'
import ChatThreads from './src/components/ChatThreads'
import EncryptedStorage from 'react-native-encrypted-storage';
import { ChatClient } from '@azure/communication-chat';
import { AzureCommunicationTokenCredential } from '@azure/communication-common';
const Stack = createNativeStackNavigator();
const config = {
screens: {
Callback: {
path: 'com.retail_manager.metro/callback'
}
},
};
const linking = {
prefixes: ['https://spokeauth', 'spokeauth://'],
config,
};
const App: () => Node = () => {
return (
<NavigationContainer linking={linking} fallback={<LottieView source={require('./src/animation.json')} autoPlay />}>
<Stack.Navigator
initialRouteName="SplashComponent"
screenOptions={{
headerShown: true,
headerLeft: () => (
<Image source={{
uri: "https://pbs.twimg.com/profile_images/1021680352740499456/61CD38PN_400x400.jpg"
}}
style={{
width: 40,
height: 40,
borderRadius: 40/ 2,
marginRight: 10
}} />
),
headerRight: () => (
<FontAwesomeIcon icon={ faEdit } size={ 24 }/>
)
}}>
<Stack.Screen
name="Splash"
component={Splash}
options={{
headerShown: false
}} />
<Stack.Screen
name="Login"
component={Login}
options={{
headerShown: false
}}/>
<Stack.Screen
name="Welcome"
component={ChatThreads}
options={{
title: "Chat",
}} />
<Stack.Screen
name="Chat"
component={Chat}
options={{
title: "Chat",
}} />
<Stack.Screen
name="Callback"
options={{
headerShown: false
}}>
{props => (<Callback {...props} />)}
</Stack.Screen>
</Stack.Navigator>
</NavigationContainer>
);
};
export default App;