commerce-toolkit icon indicating copy to clipboard operation
commerce-toolkit copied to clipboard

Add a logging API to the storefrontHooks to manage events

Open moransantiago opened this issue 3 years ago • 2 comments

Uses a logging prop that exposes callbacks to hang from events throughout the storefronts.

The callbacks structure is the following:

  • onError: function ( type: 'addLineItemError' | 'createCartError' | 'removeLineItemError' | 'updateLineItemError', error: Error )
  • onSuccess: function ( type: 'addLineItemSuccess' | 'createCartSuccess' | 'removeLineItemSuccess' | 'updateLineItemSuccess', data: Cart )

moransantiago avatar Nov 17 '22 13:11 moransantiago

The latest updates on your projects. Learn more about Vercel for Git ↗︎

2 Ignored Deployments
Name Status Preview Comments Updated
commerce-toolkit-nextjs-localstorage ⬜️ Ignored (Inspect) Dec 13, 2022 at 1:51PM (UTC)
commerce-toolkit-nextjs-shopify ⬜️ Ignored (Inspect) Dec 13, 2022 at 1:51PM (UTC)

vercel[bot] avatar Nov 17 '22 13:11 vercel[bot]

🦋 Changeset detected

Latest commit: 7dce7941204763d933c3b31511c65838624e4cfe

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@bsmnt/storefront-hooks Minor

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

changeset-bot[bot] avatar Nov 17 '22 13:11 changeset-bot[bot]