diff --git a/samples/react-native/src/App.tsx b/samples/react-native/src/App.tsx index 814c675965..1a7b478246 100644 --- a/samples/react-native/src/App.tsx +++ b/samples/react-native/src/App.tsx @@ -15,6 +15,7 @@ import { LogBox, Platform } from 'react-native'; import * as ImagePicker from 'react-native-image-picker'; import RunningIndicator from './components/RunningIndicator'; +import BundledPlaygroundScreen from './Screens/BundledPlaygroundScreen'; import WebviewScreen from './Screens/WebviewScreen'; import getErrorsTab from './tabs/ErrorsTab'; import getPerformanceTab from './tabs/PerformanceTab'; @@ -69,7 +70,7 @@ Sentry.init({ }, logsOrigin: 'all', enableLogs: true, - beforeSendLog: (log) => { + beforeSendLog: log => { return log; }, enableUserInteractionTracing: true, @@ -105,7 +106,7 @@ Sentry.init({ Platform.OS === 'ios' && isTurboModuleEnabled() ? // The global patch doesn't work on iOS with the New Architecture in this Sample app // In - false + false : true, }), Sentry.feedbackIntegration({ @@ -211,7 +212,7 @@ function BottomTabsNavigator() { /> + ); diff --git a/samples/react-native/src/Screens/BundledPlaygroundScreen.tsx b/samples/react-native/src/Screens/BundledPlaygroundScreen.tsx new file mode 100644 index 0000000000..db08f94cb8 --- /dev/null +++ b/samples/react-native/src/Screens/BundledPlaygroundScreen.tsx @@ -0,0 +1,16 @@ +import { StackNavigationProp } from '@react-navigation/stack'; +import * as Sentry from '@sentry/react-native'; +import { withSentryPlayground } from '@sentry/react-native/playground'; +import { SafeAreaView } from 'react-native'; + +interface Props { + navigation: StackNavigationProp; +} + +const BundledPlaygroundScreen = withSentryPlayground( + Sentry.withProfiler((_: Props) => { + return ; + }), +); + +export default BundledPlaygroundScreen; diff --git a/samples/react-native/src/tabs/PlaygroundTab.tsx b/samples/react-native/src/tabs/PlaygroundTab.tsx index e52def83df..fdc1f1ad17 100644 --- a/samples/react-native/src/tabs/PlaygroundTab.tsx +++ b/samples/react-native/src/tabs/PlaygroundTab.tsx @@ -41,6 +41,9 @@ const styles = StyleSheet.create({ padding: 5, flex: 1, }, + separator: { + marginVertical: 8, + }, image: { width: 200, height: 200, @@ -56,6 +59,8 @@ const styles = StyleSheet.create({ }, }); +const Separator = () => ; + export default function getPlaygroundTab() { return Sentry.withProfiler( (props: Props) => { @@ -72,6 +77,14 @@ export default function getPlaygroundTab() { props.navigation.navigate('Webview'); }} /> + +