Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ export default function CheckoutPage({ params }: CheckoutPageProps) {

// Track cart key for sidebar updates
const cartKey = cart
? `${cart.id}-${cart.total}-${cart.total_quantity}`
? `${cart.id}-${cart.total}-${cart.total_quantity}-${cart.gift_card_total ?? ""}`

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

its better to use amount due which will work with both gift cards and store credits

: null;
const prevOrderKeyRef = useRef(cartKey);

Expand Down
4 changes: 2 additions & 2 deletions src/components/checkout/CouponCode.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ export function CouponCode({
onClick={() => handleRemoveDiscount(promotion.code)}
disabled={removing === promotion.code}
aria-label={`Remove code ${promotion.code}`}
className="text-gray-400 hover:text-gray-600 p-0.5"
className="text-gray-400 hover:text-gray-600 cursor-pointer p-0.5"
>
<X className="h-3.5 w-3.5" />
</button>
Expand All @@ -128,7 +128,7 @@ export function CouponCode({
onClick={handleRemoveGiftCard}
disabled={removing === appliedGiftCard.id}
aria-label="Remove gift card"
className="text-gray-400 hover:text-gray-600 p-0.5"
className="text-gray-400 hover:text-gray-600 cursor-pointer p-0.5"
>
<X className="h-3.5 w-3.5" />
</button>
Expand Down
Loading