@metron-labs/quote-react 0.1.29 → 0.1.30

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.
@@ -118,10 +118,14 @@ function QuickQuoteInner({ fullPage = false, hideHeader = false, internal = fals
118
118
  }, [writeQuoteHistory]);
119
119
  const backToResults = useCallback(() => {
120
120
  const quoteStage = window.history.state?.boqQuoteStage;
121
- if (quoteStage === "basket")
122
- window.history.back();
123
- else
124
- setStage(scheduleResult ? "results" : "entry");
121
+ if (quoteStage === "basket") {
122
+ const url = new URL(window.location.href);
123
+ url.hash = "matched-products";
124
+ window.history.replaceState({ boqQuoteStage: "results" }, "", url);
125
+ setStage("results");
126
+ return;
127
+ }
128
+ setStage(scheduleResult ? "results" : "entry");
125
129
  }, [scheduleResult]);
126
130
  // Every screen change, forward or back, lands at the top. Runs after the new screen has
127
131
  // rendered, so it also wins over the browser restoring the old scroll on history.back().