@lookiero/checkout 0.6.0-beta.6 → 0.6.0-beta.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
// import { defaultStackParser, makeFetchTransport } from "@sentry/browser";
|
|
2
2
|
// import { FetchImpl } from "@sentry/browser/types/transports/utils";
|
|
3
3
|
import { makeMain } from "@sentry/core";
|
|
4
|
-
import
|
|
4
|
+
import { ReactNativeClient, Hub, ErrorBoundary, ReactNativeTracing } from "@sentry/react-native";
|
|
5
5
|
// import { ReactNativeTransportOptions } from "@sentry/react-native/dist/js/options";
|
|
6
6
|
// import { makeReactNativeTransport } from "@sentry/react-native/dist/js/transports/native";
|
|
7
7
|
// import { NATIVE } from "@sentry/react-native/dist/js/wrapper";
|
|
@@ -11,12 +11,12 @@ import React, { useEffect } from "react";
|
|
|
11
11
|
import { Platform } from "react-native";
|
|
12
12
|
const sentryLogger = ({ publicKey, environment, release, project }) => {
|
|
13
13
|
let mainHub;
|
|
14
|
-
const client = new
|
|
14
|
+
const client = new ReactNativeClient({
|
|
15
15
|
environment,
|
|
16
16
|
release,
|
|
17
17
|
dsn: `https://${publicKey}@o179049.ingest.sentry.io/${project}`,
|
|
18
18
|
integrations: [
|
|
19
|
-
new
|
|
19
|
+
new ReactNativeTracing({
|
|
20
20
|
enableAppStartTracking: true,
|
|
21
21
|
}),
|
|
22
22
|
],
|
|
@@ -26,7 +26,7 @@ const sentryLogger = ({ publicKey, environment, release, project }) => {
|
|
|
26
26
|
// stackParser: defaultStackParser,
|
|
27
27
|
// transport: defaultTransport,
|
|
28
28
|
});
|
|
29
|
-
const hub = new
|
|
29
|
+
const hub = new Hub(client);
|
|
30
30
|
const switchMainHub = () => {
|
|
31
31
|
if (!mainHub) {
|
|
32
32
|
mainHub = makeMain(hub);
|
|
@@ -37,15 +37,15 @@ const sentryLogger = ({ publicKey, environment, release, project }) => {
|
|
|
37
37
|
};
|
|
38
38
|
return (Component) => {
|
|
39
39
|
switchMainHub();
|
|
40
|
-
const WrappedComponent = Sentry.wrap(Component);
|
|
40
|
+
// const WrappedComponent = Sentry.wrap(Component);
|
|
41
41
|
// eslint-disable-next-line react/display-name
|
|
42
42
|
return (props) => {
|
|
43
43
|
useEffect(() => revertMainHub, []);
|
|
44
44
|
return (
|
|
45
45
|
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
46
46
|
// @ts-ignore
|
|
47
|
-
React.createElement(
|
|
48
|
-
React.createElement(
|
|
47
|
+
React.createElement(ErrorBoundary, null,
|
|
48
|
+
React.createElement(Component, { ...props })));
|
|
49
49
|
};
|
|
50
50
|
};
|
|
51
51
|
};
|