From 0dad8ba839c3b62653513dba4dbc3f7e1332d927 Mon Sep 17 00:00:00 2001 From: Michael Novotny Date: Wed, 2 Aug 2023 09:43:38 -0500 Subject: [PATCH] More profiles --- components/cart/add-to-cart.tsx | 3 ++- components/cart/delete-item-button.tsx | 3 ++- components/cart/edit-item-quantity-button.tsx | 3 ++- lib/shopify/index.ts | 16 ++++++++-------- 4 files changed, 14 insertions(+), 11 deletions(-) diff --git a/components/cart/add-to-cart.tsx b/components/cart/add-to-cart.tsx index 92e2d50b0..f5312f8af 100644 --- a/components/cart/add-to-cart.tsx +++ b/components/cart/add-to-cart.tsx @@ -37,6 +37,7 @@ export function AddToCart({ disabled={isPending || !availableForSale || !selectedVariantId} title={title} onClick={() => { + console.time('profile - add to cart - button'); // Safeguard in case someone messes with `disabled` in devtools. if (!availableForSale || !selectedVariantId) return; @@ -47,7 +48,7 @@ export function AddToCart({ alert(error); return; } - + console.timeEnd('profile - add to cart - button'); router.refresh(); }); }} diff --git a/components/cart/delete-item-button.tsx b/components/cart/delete-item-button.tsx index f279f178d..b34ae6bf6 100644 --- a/components/cart/delete-item-button.tsx +++ b/components/cart/delete-item-button.tsx @@ -15,6 +15,7 @@ export default function DeleteItemButton({ item }: { item: CartItem }) {