@lookiero/checkout 0.6.0-beta.17 → 0.6.0-beta.19

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,4 +1,4 @@
1
- import React, { lazy, Suspense } from "react";
1
+ import React, { lazy, Suspense, useMemo } from "react";
2
2
  import { Navigate, Outlet, useRoutes as reactRouterUseRoutes } from "react-router-native";
3
3
  import { Spinner } from "../../../shared/ui/components/atoms/spinner/Spinner";
4
4
  import { App } from "../views/App";
@@ -13,7 +13,7 @@ const Summary = lazy(() => import("../views/summary/Summary").then((module) => (
13
13
  const Checkout = lazy(() => import("../views/checkout/Checkout").then((module) => ({ default: module.Checkout })));
14
14
  const Feedback = lazy(() => import("../views/feedback/Feedback").then((module) => ({ default: module.Feedback })));
15
15
  const Routing = ({ basePath = "", customer, locale, I18n, menu, tabBar, getAuthToken, onI18nError, onNotAccessible, useRedirect, wrapUseRoutes = (routes) => routes, }) => {
16
- const useRoutes = wrapUseRoutes(reactRouterUseRoutes);
16
+ const useRoutes = useMemo(() => wrapUseRoutes(reactRouterUseRoutes), [wrapUseRoutes]);
17
17
  const routes = useRoutes([
18
18
  {
19
19
  path: "",
@@ -8,6 +8,14 @@ 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
+ },
11
19
  }),
12
20
  ];
13
21
  const wrap = (Component) => Component;
@@ -64,18 +64,26 @@ const sentryLogger = ({ publicKey, environment, release, project }) => {
64
64
  /webappstoolbarba\.texthelp\.com\//i,
65
65
  /metrics\.itunes\.apple\.com\.edgesuite\.net\//i,
66
66
  ],
67
+ beforeSend: (event) => {
68
+ console.log(event);
69
+ return event;
70
+ },
71
+ beforeSendTransaction: (event) => {
72
+ console.log(event);
73
+ return event;
74
+ },
67
75
  });
68
76
  const hub = new Hub(client);
69
77
  const onMount = (customerId) => {
70
78
  if (!mainHub) {
71
79
  hub.setUser({ id: customerId });
72
- // hub.startSession();
80
+ hub.startSession();
73
81
  mainHub = makeMain(hub);
74
82
  }
75
83
  };
76
84
  const onUnMount = () => {
77
85
  hub.setUser(null);
78
- // hub.endSession();
86
+ hub.endSession();
79
87
  makeMain(mainHub);
80
88
  };
81
89
  return (Component) => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lookiero/checkout",
3
- "version": "0.6.0-beta.17",
3
+ "version": "0.6.0-beta.19",
4
4
  "main": "dist/index.js",
5
5
  "types": "dist/index.d.ts",
6
6
  "files": [