github internxt/drive-web v1.0.648

17 hours ago

Description

This PR implements the logic to track incomplete checkouts. It adds a new trackIncompleteCheckout method to the checkoutService and integrates it into the checkout view.

Key changes:
Updated SDK version

Service: Added trackIncompleteCheckout to checkoutService, which constructs the checkout URL and calls the users SDK.

View: Integrated the tracking call within a useEffect in the checkout component.

Logic: Implemented a useRef (hasTrackedRef) to ensure the tracking event is triggered only once per session/render to prevent duplicate events.

Tests: Added unit tests for the new service method to verify URL construction and error handling.

Related Issues

Related Pull Requests

Checklist

  • Changes have been tested locally.
  • Unit tests have been written or updated as necessary.
  • The code adheres to the repository's coding standards.
  • Relevant documentation has been added or updated.
  • No new warnings or errors have been introduced.
  • SonarCloud issues have been reviewed and addressed.
  • QA Passed

Testing Process

Additional Notes

Video test on the task

Don't miss a new drive-web release

NewReleases is sending notifications on new releases.