@lookiero/checkout 0.6.0-beta.23 → 0.6.0-beta.24
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,5 +1,5 @@
|
|
|
1
1
|
import { I18n } from "@lookiero/i18n-react";
|
|
2
|
-
import
|
|
2
|
+
import React from "react";
|
|
3
3
|
import { useRoutes as reactRouterUseRoutes } from "react-router-native";
|
|
4
4
|
import { Customer } from "../../../projection/shared/customer";
|
|
5
5
|
import { Menu, TabBar } from "../views/navigation/Navigation";
|
|
@@ -16,5 +16,11 @@ interface RoutingProps {
|
|
|
16
16
|
readonly useRedirect: () => Record<string, string>;
|
|
17
17
|
readonly useRoutes: typeof reactRouterUseRoutes;
|
|
18
18
|
}
|
|
19
|
-
|
|
20
|
-
|
|
19
|
+
/**
|
|
20
|
+
* Provided useRoutes is not stable (when integrated with Sentry) as it's rendering a different component tree.
|
|
21
|
+
*
|
|
22
|
+
* https://github.com/getsentry/sentry-javascript/blob/master/packages/react/src/reactrouterv6.tsx#L221
|
|
23
|
+
* (SentryRoutes is a new component after each re-render)
|
|
24
|
+
*/
|
|
25
|
+
declare const MemoizedRouting: React.NamedExoticComponent<RoutingProps>;
|
|
26
|
+
export { MemoizedRouting as Routing };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import React, { lazy, Suspense } from "react";
|
|
1
|
+
import React, { lazy, memo, Suspense } from "react";
|
|
2
2
|
import { Navigate, Outlet } from "react-router-native";
|
|
3
3
|
import { Spinner } from "../../../shared/ui/components/atoms/spinner/Spinner";
|
|
4
4
|
import { App } from "../views/App";
|
|
@@ -69,4 +69,11 @@ const Routing = ({ basePath = "", customer, locale, I18n, menu, tabBar, getAuthT
|
|
|
69
69
|
]);
|
|
70
70
|
return routes;
|
|
71
71
|
};
|
|
72
|
-
|
|
72
|
+
/**
|
|
73
|
+
* Provided useRoutes is not stable (when integrated with Sentry) as it's rendering a different component tree.
|
|
74
|
+
*
|
|
75
|
+
* https://github.com/getsentry/sentry-javascript/blob/master/packages/react/src/reactrouterv6.tsx#L221
|
|
76
|
+
* (SentryRoutes is a new component after each re-render)
|
|
77
|
+
*/
|
|
78
|
+
const MemoizedRouting = memo(Routing);
|
|
79
|
+
export { MemoizedRouting as Routing };
|
|
@@ -8,14 +8,6 @@ const integrations = [
|
|
|
8
8
|
...defaultIntegrations,
|
|
9
9
|
new BrowserTracing({
|
|
10
10
|
routingInstrumentation: reactRouterV6Instrumentation(useEffect, useLocation, useNavigationType, createRoutesFromChildren, matchRoutes),
|
|
11
|
-
beforeNavigate: (context) => {
|
|
12
|
-
console.log("beforeNavigate", context);
|
|
13
|
-
return context;
|
|
14
|
-
},
|
|
15
|
-
shouldCreateSpanForRequest: (url) => {
|
|
16
|
-
console.log(url);
|
|
17
|
-
return true;
|
|
18
|
-
},
|
|
19
11
|
}),
|
|
20
12
|
];
|
|
21
13
|
const wrap = (Component) => Component;
|
|
@@ -66,14 +66,6 @@ const sentryLogger = ({ publicKey, environment, release, project }) => {
|
|
|
66
66
|
/webappstoolbarba\.texthelp\.com\//i,
|
|
67
67
|
/metrics\.itunes\.apple\.com\.edgesuite\.net\//i,
|
|
68
68
|
],
|
|
69
|
-
beforeSend: (event) => {
|
|
70
|
-
console.log(event);
|
|
71
|
-
return event;
|
|
72
|
-
},
|
|
73
|
-
beforeSendTransaction: (event) => {
|
|
74
|
-
console.log(event);
|
|
75
|
-
return event;
|
|
76
|
-
},
|
|
77
69
|
});
|
|
78
70
|
const hub = new Hub(client);
|
|
79
71
|
const onMount = (customerId) => {
|