@lookiero/checkout 0.8.25 → 0.8.26

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.
@@ -6,6 +6,7 @@ import { Platform, View } from "react-native";
6
6
  import { useNavigate } from "react-router-native";
7
7
  import { CheckoutItemStatus } from "../../../../domain/checkoutItem/model/checkoutItem";
8
8
  import { useTrackPageView } from "../../../../shared/tracking/infrastructure/useTrackPageView";
9
+ import { useTrackPressContinue } from "../../../../shared/tracking/infrastructure/useTrackPressContinue";
9
10
  import { Spinner } from "../../../../shared/ui/components/atoms/spinner/Spinner";
10
11
  import { useViewFirstAvailableCheckoutByCustomerId } from "../../../projection/checkout/react/useViewFirstAvailableCheckoutByCustomerId";
11
12
  import { useViewPricingByCheckoutId } from "../../../projection/pricing/react/useViewPricingByCheckoutId";
@@ -32,9 +33,15 @@ const Checkout = ({ children, customerId, country, useRedirect }) => {
32
33
  });
33
34
  const navigate = useNavigate();
34
35
  const basePath = useBasePath();
36
+ const trackPressContinue = useTrackPressContinue({
37
+ page: TrackingPage.CHECKOUT,
38
+ country,
39
+ checkoutId: checkout?.id,
40
+ });
35
41
  const handleOnSubmit = useCallback(() => {
42
+ trackPressContinue();
36
43
  navigate(`${basePath}/${Routes.CHECKOUT}/${Routes.CHECKOUT_PAYMENT}`, { replace: true });
37
- }, [basePath, navigate]);
44
+ }, [basePath, navigate, trackPressContinue]);
38
45
  const checkoutItemsKept = useMemo(() => checkout?.items.filter((checkoutItem) => checkoutItem.status === CheckoutItemStatus.KEPT || checkoutItem.status === CheckoutItemStatus.REPLACED), [checkout?.items]);
39
46
  const hasReplacedCheckoutItem = useMemo(() => checkout?.items.some((checkoutItem) => checkoutItem.status === CheckoutItemStatus.REPLACED), [checkout?.items]);
40
47
  const dependenciesLoadedStatuses = [QueryStatus.ERROR, QueryStatus.SUCCESS];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lookiero/checkout",
3
- "version": "0.8.25",
3
+ "version": "0.8.26",
4
4
  "main": "dist/index.js",
5
5
  "types": "dist/index.d.ts",
6
6
  "files": [