Commit d52afbd
committed
fix(shop): restore onSuccess for add-to-cart so new line appears
Add-to-cart can't optimistically render the new line item (onMutate
only has the variant ID, not the full product snapshot). Without
onSuccess setting the server response, the drawer opened empty until
the background refetch landed. Restore onSuccess for add only — the
concurrent-flicker risk is minimal here since rapid-fire adds are rare,
and the worst case is a brief badge-count wobble.1 parent 1cc2274 commit d52afbd
1 file changed
+7
-3
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
95 | 95 | | |
96 | 96 | | |
97 | 97 | | |
98 | | - | |
99 | | - | |
100 | | - | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
101 | 105 | | |
102 | 106 | | |
103 | 107 | | |
| |||
0 commit comments