@metron-labs/quote-react 0.1.58 → 0.1.59
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -598,17 +598,8 @@ export default function ScheduleResultsStage({ scheduleResult, onStartOver, cart
|
|
|
598
598
|
onCartSeeded();
|
|
599
599
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
600
600
|
}, [cartSeeded]);
|
|
601
|
-
//
|
|
602
|
-
//
|
|
603
|
-
// user navigates back here. Only seed rows that are not already present.
|
|
604
|
-
useEffect(() => {
|
|
605
|
-
for (const row of rows) {
|
|
606
|
-
const existing = cart[row.item.line_id];
|
|
607
|
-
if (!existing && !row.unmatchable && row.best)
|
|
608
|
-
onAddToCart(toCartItem(row));
|
|
609
|
-
}
|
|
610
|
-
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
611
|
-
}, [scheduleResult]);
|
|
601
|
+
// After seeding, the cart is authoritative: coming back here never re-adds a line the user
|
|
602
|
+
// removed in the basket, nor rebuilds one and overwrites quantities resolved there.
|
|
612
603
|
useEffect(() => {
|
|
613
604
|
if (!selectedReviewId) {
|
|
614
605
|
setCatalogueSearchResults([]);
|