Last active
October 4, 2021 03:06
-
-
Save cpv123/ee9b26bee1ec83c745f37c59e26f3157 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const handleAddToCart = async (productId: string, quantity: number) => { | |
const { cart } = await commerce.cart.add(productId, quantity) | |
setCart(cart) | |
plausible("addProductToCart") | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment