-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathApp.tsx
More file actions
74 lines (65 loc) · 2.01 KB
/
App.tsx
File metadata and controls
74 lines (65 loc) · 2.01 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
import React from 'react';
import { Provider } from 'react-redux';
import { StatusBar } from 'expo-status-bar';
import { ActivityIndicator, LogBox } from 'react-native';
// import 'react-native-gesture-handler';
import './global.css';
import { store } from './src/store';
import AppNavigator from './src/navigation/AppNavigator';
// import SessionExpiredModal from './src/components/SessionExpiredModal';
// import {
// initializeAppLifecycle,
// cleanupAppLifecycle,
// } from './src/services/appLifecycleService';
import { ClerkLoaded, ClerkLoading, ClerkProvider } from '@clerk/clerk-expo';
import { tokenCache } from '@clerk/clerk-expo/token-cache';
// Suppress the Reanimated plugin warning until NativeWind/css-interop is updated
LogBox.ignoreLogs([
/\[Reanimated\] Seems like you are using a Babel plugin `react-native-reanimated\/plugin`/,
]);
// Additional console suppression for the warning
const originalWarn = console.warn;
// eslint-disable-next-line no-console
console.warn = (...args) => {
const message = args.join(' ');
if (
message.includes(
'[Reanimated] Seems like you are using a Babel plugin `react-native-reanimated/plugin`'
)
) {
return; // Suppress this specific warning
}
originalWarn.apply(console, args);
};
const AppContent = () => {
// useEffect(() => {
// initializeAppLifecycle();
// return () => {
// cleanupAppLifecycle();
// };
// }, []);
return (
<>
<StatusBar style="auto" />
<AppNavigator />
</>
);
};
export default function App() {
const publishableKey = process.env.EXPO_PUBLIC_CLERK_PUBLISHABLE_KEY;
if (!publishableKey) {
throw new Error('Add EXPO_PUBLIC_CLERK_PUBLISHABLE_KEY to your .env file');
}
return (
<Provider store={store}>
<ClerkProvider tokenCache={tokenCache} publishableKey={publishableKey}>
<ClerkLoaded>
<AppContent />
</ClerkLoaded>
<ClerkLoading>
<ActivityIndicator />
</ClerkLoading>
</ClerkProvider>
</Provider>
);
}