Skip to content

Commit

Permalink
Merge branch 'PWA-3162-V3' of github.com:magento/pwa-studio into PWA-…
Browse files Browse the repository at this point in the history
…3162-V3
  • Loading branch information
glo82145 committed Sep 27, 2023
2 parents e28f243 + f41150f commit 24117b6
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 17 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,6 @@ export const CartTriggerFragment = gql`
fragment CartTriggerFragment on Cart {
id
total_quantity
total_summary_quantity_including_config
}
`;
2 changes: 1 addition & 1 deletion packages/peregrine/lib/talons/Header/useCartTrigger.js
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ export const useCartTrigger = props => {
errorPolicy: 'all'
});

const itemCount = data?.cart?.total_quantity || 0;
const itemCount = data?.cart?.total_summary_quantity_including_config || 0;

const handleTriggerClick = useCallback(() => {
// Open the mini cart.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ Array [
<div>
<button
aria-expanded={false}
aria-label="Toggle mini cart. You have 100 items in your cart."
aria-label="Toggle mini cart. You have 0 items in your cart."
onClick={[Function]}
>
<span>
Expand Down Expand Up @@ -34,14 +34,11 @@ Array [
/>
</svg>
</span>
<span>
99+
</span>
</button>
</div>,
<button
aria-expanded={false}
aria-label="Toggle mini cart. You have 100 items in your cart."
aria-label="Toggle mini cart. You have 0 items in your cart."
onClick={[Function]}
>
<span>
Expand Down Expand Up @@ -70,9 +67,6 @@ Array [
/>
</svg>
</span>
<span>
99+
</span>
</button>,
<require('../MiniCart')
isOpen={false}
Expand All @@ -86,7 +80,7 @@ Array [
<div>
<button
aria-expanded={false}
aria-label="Toggle mini cart. You have 10 items in your cart."
aria-label="Toggle mini cart. You have 0 items in your cart."
onClick={[Function]}
>
<span>
Expand Down Expand Up @@ -115,14 +109,11 @@ Array [
/>
</svg>
</span>
<span>
10
</span>
</button>
</div>,
<button
aria-expanded={false}
aria-label="Toggle mini cart. You have 10 items in your cart."
aria-label="Toggle mini cart. You have 0 items in your cart."
onClick={[Function]}
>
<span>
Expand Down Expand Up @@ -151,9 +142,6 @@ Array [
/>
</svg>
</span>
<span>
10
</span>
</button>,
<require('../MiniCart')
isOpen={false}
Expand Down

0 comments on commit 24117b6

Please sign in to comment.