pollination-react-io 1.101.2 → 1.102.0

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.
@@ -56432,8 +56432,8 @@ var StudyCard = function (_a) {
56432
56432
  var handle = setInterval(function () {
56433
56433
  setDuration(getDuration(study));
56434
56434
  }, 1000);
56435
- return study.status.finished_at ? undefined : function () { return clearInterval(handle); };
56436
- }, [study]);
56435
+ return function () { return clearInterval(handle); };
56436
+ }, [study, getDuration]);
56437
56437
  /*
56438
56438
  * Manage hover
56439
56439
  */
@@ -56617,7 +56617,7 @@ var StudyCard = function (_a) {
56617
56617
  React__default.createElement("div", { className: 'item7' },
56618
56618
  React__default.createElement(Button, { style: (width > 600)
56619
56619
  ? { display: 'inline', margin: '0 10px 0 0' }
56620
- : { display: 'inline', float: 'right', margin: '0 10px 0 0' }, disabled: false, onClick: function (e) {
56620
+ : { display: 'inline', float: 'right', margin: '0 10px 0 0' }, disabled: !study || (![dist$1.JobStatusEnum.Cancelled, dist$1.JobStatusEnum.Completed].includes(study.status.status)), onClick: function (e) {
56621
56621
  e.stopPropagation();
56622
56622
  if (!study)
56623
56623
  return;
@@ -56764,13 +56764,8 @@ var RunCard = function (_a) {
56764
56764
  var handle = setInterval(function () {
56765
56765
  setDuration(getDuration(run));
56766
56766
  }, 1000);
56767
- return run.status.finished_at ? undefined : function () { return clearInterval(handle); };
56767
+ return function () { return clearInterval(handle); };
56768
56768
  }, [run, getDuration]);
56769
- var daysSinceFinished = useMemo(function () {
56770
- if (!run || !run.status.finished_at)
56771
- return undefined;
56772
- return dayjs_min().diff(dayjs_min(run.status.finished_at), 'day');
56773
- }, [run]);
56774
56769
  /**
56775
56770
  * Manage hover effect
56776
56771
  */
@@ -57027,7 +57022,6 @@ var RunCard = function (_a) {
57027
57022
  " Cancel"),
57028
57023
  React__default.createElement(Button, { style: { marginRight: '0.75rem' }, loading: retryLoading, disabled: !run || !run.status ||
57029
57024
  ![dist$1.RunStatusEnum.Failed, dist$1.RunStatusEnum.Cancelled].includes(run.status.status) ||
57030
- daysSinceFinished >= 14 ||
57031
57025
  retryLoading, onClick: function (e) {
57032
57026
  setRetryLoading(true);
57033
57027
  e.stopPropagation();