Skip to content

Commit 09d54fb

Browse files
committed
Show persisted cart quantity immediately, will be updated if query returns different data
1 parent e412796 commit 09d54fb

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/components/Header/Cart.component.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,8 @@ const Cart: FC<ICartProps> = ({ stickyNav }) => {
3333
fetchPolicy: 'cache-and-network',
3434
});
3535

36-
// Use query loading state in combination with store loading state
37-
const productCount = (!isLoading && !queryLoading) ? cart?.totalProductsCount : undefined;
36+
// Show persisted cart quantity immediately, will be updated if query returns different data
37+
const productCount = cart?.totalProductsCount;
3838

3939
return (
4040
<>

0 commit comments

Comments
 (0)