-
Notifications
You must be signed in to change notification settings - Fork 0
/
App.js
57 lines (53 loc) · 1.55 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
import { StatusBar } from 'expo-status-bar';
import { StyleSheet, Text, View } from 'react-native';
import Login from './App/Screens/LoginScreen/Login';
import { ClerkProvider, SignedIn, SignedOut } from '@clerk/clerk-expo';
import * as SecureStore from "expo-secure-store";
import { NavigationContainer } from '@react-navigation/native';
import BottomTabNavigation from './App/Navigations/BottomTabNavigation';
import { useFonts } from 'expo-font';
const tokenCache = {
async getToken(key) {
try {
return SecureStore.getItemAsync(key);
} catch (err) {
return null;
}
},
async saveToken(key, value) {
try {
return SecureStore.setItemAsync(key, value);
} catch (err) {
return;
}
},
};
export default function App() {
const [fontsLoaded] = useFonts({
'outfit': require('./assets/fonts/Outfit-Regular.ttf'),
'outfit-medium': require('./assets/fonts/Outfit-Medium.ttf'),
'outfit-bold': require('./assets/fonts/Outfit-Bold.ttf'),
});
return (
<ClerkProvider tokenCache={tokenCache} publishableKey='pk_test_c21vb3RoLWhhbXN0ZXItNjUuY2xlcmsuYWNjb3VudHMuZGV2JA'>
<View style={styles.container}>
<SignedIn>
<NavigationContainer>
<BottomTabNavigation/>
</NavigationContainer>
</SignedIn>
<SignedOut>
<Login/>
</SignedOut>
<StatusBar style="auto" />
</View>
</ClerkProvider>
);
}
const styles = StyleSheet.create({
container: {
flex: 1,
backgroundColor: '#fff',
marginTop: 35,
},
});