@sevenfold/setto-client 0.8.1 → 0.8.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.
@@ -21384,15 +21384,16 @@ function SettoPreviewBar() {
21384
21384
  useEffect(() => {
21385
21385
  if (!onPreview || session) return;
21386
21386
  let cancelled = false;
21387
- api.request(`/onboarding/sites/${config.siteId}/sold`, {}, "siteSold").then((d) => {
21388
- if (!cancelled) setSoldPublic(d.sold === true);
21387
+ fetch(`${config.apiUrl}/onboarding/sites/${config.siteId}/sold`, {
21388
+ headers: { Accept: "application/json" }
21389
+ }).then((r) => r.ok ? r.json() : null).then((d) => {
21390
+ if (!cancelled && d) setSoldPublic(d.sold === true);
21389
21391
  }).catch(() => {
21390
- if (!cancelled) setSoldPublic(null);
21391
21392
  });
21392
21393
  return () => {
21393
21394
  cancelled = true;
21394
21395
  };
21395
- }, [onPreview, session, api, config.siteId]);
21396
+ }, [onPreview, session, config.apiUrl, config.siteId]);
21396
21397
  const state = previewBarState({
21397
21398
  onPreview,
21398
21399
  authLoading,