-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathApp.js
More file actions
61 lines (52 loc) · 1.8 KB
/
Copy pathApp.js
File metadata and controls
61 lines (52 loc) · 1.8 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
import React from 'react';
import { NavigationContainer } from '@react-navigation/native';
import { createNativeStackNavigator } from '@react-navigation/native-stack';
import { AppProvider } from './src/context/AppContext';
import * as Sentry from '@sentry/react-native'; // 1. Import Sentry
// Import Screens
import HomeScreen from './src/screens/HomeScreen';
import ChatScreen from './src/screens/ChatScreen';
import AddPersona from './src/screens/AddPersona';
// 2. Initialize Sentry (Run this ONCE at the top)
Sentry.init({
dsn: 'https://a96bd3eedb048304bb558249063d3879@o4510693763121152.ingest.de.sentry.io/4510693772361808',
debug: true, // If true, prints Sentry logs to console (good for testing)
tracesSampleRate: 1.0, // Capture 100% of transactions for performance monitoring
});
const Stack = createNativeStackNavigator();
function App() {
return (
<AppProvider>
<NavigationContainer>
<Stack.Navigator
initialRouteName="Home"
screenOptions={{
headerStyle: { backgroundColor: '#0F172A' },
headerTintColor: '#A6F0FF',
headerTitleStyle: { fontWeight: 'bold', color: '#FFFFFF' },
headerShown: false
}}
>
<Stack.Screen
name="Home"
component={HomeScreen}
/>
<Stack.Screen
name="Chat"
component={ChatScreen}
/>
<Stack.Screen
name="AddPersona"
component={AddPersona}
options={{
headerShown: false,
presentation: 'modal'
}}
/>
</Stack.Navigator>
</NavigationContainer>
</AppProvider>
);
}
// 3. Wrap your App component with Sentry
export default Sentry.wrap(App);