pollination-react-io 1.56.1 → 1.56.3

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.
@@ -38015,7 +38015,7 @@ var usePollinationPanel = function () {
38015
38015
  return run;
38016
38016
  }
38017
38017
  catch (error) {
38018
- console.error(error);
38018
+ throw error;
38019
38019
  }
38020
38020
  }, [panel]);
38021
38021
  var fetchLocalJob = useCallback(function (path) {
@@ -38030,7 +38030,8 @@ var usePollinationPanel = function () {
38030
38030
  return job;
38031
38031
  }
38032
38032
  catch (error) {
38033
- console.error(error);
38033
+ // Do nothing. It is written at the end
38034
+ return undefined;
38034
38035
  }
38035
38036
  }, [panel]);
38036
38037
  return {
@@ -48742,6 +48743,10 @@ var RunCard = function (_a) {
48742
48743
  fallbackData: localRun ? undefined : _run,
48743
48744
  errorRetryCount: 3,
48744
48745
  onSuccess: function (run, key, config) {
48746
+ if (localRun) {
48747
+ var jobInfo = fetchLocalJob(_run.id);
48748
+ setLocalStudy(jobInfo);
48749
+ }
48745
48750
  sendRun(run);
48746
48751
  if (run.status.finished_at)
48747
48752
  setStopRefresh(true);
@@ -48755,17 +48760,13 @@ var RunCard = function (_a) {
48755
48760
  useEffect(function () {
48756
48761
  if (!_run)
48757
48762
  return;
48758
- if (localRun) {
48759
- var jobInfo = fetchLocalJob(_run.id);
48760
- setLocalStudy(jobInfo);
48761
- }
48762
- else {
48763
- fetchJob(projectOwner, projectName, run.status.job_id)
48764
- .then(function (d) {
48765
- setStudy(d);
48766
- })
48767
- .catch(function () { setStudy(undefined); });
48768
- }
48763
+ if (localRun)
48764
+ return;
48765
+ fetchJob(projectOwner, projectName, run.status.job_id)
48766
+ .then(function (d) {
48767
+ setStudy(d);
48768
+ })
48769
+ .catch(function () { setStudy(undefined); });
48769
48770
  }, [_run]);
48770
48771
  /**
48771
48772
  * Refresh status
@@ -48824,7 +48825,7 @@ var RunCard = function (_a) {
48824
48825
  setHover(__assign(__assign({}, initialValues), (_a = {}, _a[defaultTab] = true, _a)));
48825
48826
  }, [defaultTab]);
48826
48827
  if (error)
48827
- return React__default.createElement("div", { style: { textAlign: 'center' } }, "ERROR");
48828
+ return React__default.createElement(Logo, null);
48828
48829
  return (React__default.createElement("div", { className: enableClick ? "grid-container ".concat(isReady && !run.status.finished_at && 'blink-effect')
48829
48830
  : "grid-container disable-click ".concat(isReady && !run.status.finished_at && 'blink-effect'), tabIndex: 0, role: 'button', style: __assign({ borderColor: (_d = (_c = statusMap[status]) === null || _c === void 0 ? void 0 : _c.color) !== null && _d !== void 0 ? _d : '#d0d7de' }, style), onClick: function () {
48830
48831
  if (!enableClick)