@burdenoff/website-sdk 2026.726.4 → 2026.727.2

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.
@@ -816,8 +816,10 @@ function StoreHomePage({
816
816
  const [grouped, setGrouped] = useState(null);
817
817
  const [loading, setLoading] = useState(true);
818
818
  const [error, setError] = useState(null);
819
+ const [retryKey, setRetryKey] = useState(0);
819
820
  useEffect(() => {
820
821
  let cancelled = false;
822
+ let autoRetryTimer = null;
821
823
  async function load() {
822
824
  setLoading(true);
823
825
  try {
@@ -831,7 +833,15 @@ function StoreHomePage({
831
833
  setGrouped(res.data.homeGroupedProducts);
832
834
  setError(null);
833
835
  } catch {
834
- if (!cancelled) setError("Failed to load store. Please try again.");
836
+ if (!cancelled) {
837
+ if (retryKey < 1) {
838
+ autoRetryTimer = setTimeout(() => {
839
+ if (!cancelled) setRetryKey(1);
840
+ }, 2e3);
841
+ } else {
842
+ setError("Failed to load store. Please try again.");
843
+ }
844
+ }
835
845
  } finally {
836
846
  if (!cancelled) setLoading(false);
837
847
  }
@@ -839,8 +849,9 @@ function StoreHomePage({
839
849
  load();
840
850
  return () => {
841
851
  cancelled = true;
852
+ if (autoRetryTimer) clearTimeout(autoRetryTimer);
842
853
  };
843
- }, [client, compatibleWith]);
854
+ }, [client, compatibleWith, retryKey]);
844
855
  function navigate(path) {
845
856
  if (onNavigate) {
846
857
  onNavigate(path);
@@ -998,7 +1009,7 @@ function StoreHomePage({
998
1009
  "button",
999
1010
  {
1000
1011
  type: "button",
1001
- onClick: () => window.location.reload(),
1012
+ onClick: () => setRetryKey((k) => k + 1),
1002
1013
  className: "text-sm text-primary hover:underline",
1003
1014
  children: "Retry"
1004
1015
  }