@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.
package/dist/index.js CHANGED
@@ -7261,8 +7261,10 @@ function StoreHomePage({
7261
7261
  const [grouped, setGrouped] = React.useState(null);
7262
7262
  const [loading, setLoading] = React.useState(true);
7263
7263
  const [error, setError] = React.useState(null);
7264
+ const [retryKey, setRetryKey] = React.useState(0);
7264
7265
  React.useEffect(() => {
7265
7266
  let cancelled = false;
7267
+ let autoRetryTimer = null;
7266
7268
  async function load() {
7267
7269
  setLoading(true);
7268
7270
  try {
@@ -7276,7 +7278,15 @@ function StoreHomePage({
7276
7278
  setGrouped(res.data.homeGroupedProducts);
7277
7279
  setError(null);
7278
7280
  } catch {
7279
- if (!cancelled) setError("Failed to load store. Please try again.");
7281
+ if (!cancelled) {
7282
+ if (retryKey < 1) {
7283
+ autoRetryTimer = setTimeout(() => {
7284
+ if (!cancelled) setRetryKey(1);
7285
+ }, 2e3);
7286
+ } else {
7287
+ setError("Failed to load store. Please try again.");
7288
+ }
7289
+ }
7280
7290
  } finally {
7281
7291
  if (!cancelled) setLoading(false);
7282
7292
  }
@@ -7284,8 +7294,9 @@ function StoreHomePage({
7284
7294
  load();
7285
7295
  return () => {
7286
7296
  cancelled = true;
7297
+ if (autoRetryTimer) clearTimeout(autoRetryTimer);
7287
7298
  };
7288
- }, [client, compatibleWith]);
7299
+ }, [client, compatibleWith, retryKey]);
7289
7300
  function navigate(path) {
7290
7301
  if (onNavigate) {
7291
7302
  onNavigate(path);
@@ -7443,7 +7454,7 @@ function StoreHomePage({
7443
7454
  "button",
7444
7455
  {
7445
7456
  type: "button",
7446
- onClick: () => window.location.reload(),
7457
+ onClick: () => setRetryKey((k) => k + 1),
7447
7458
  className: "text-sm text-primary hover:underline",
7448
7459
  children: "Retry"
7449
7460
  }