@betterinternship/components 1.4.4 → 1.4.5

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.esm.js CHANGED
@@ -3629,7 +3629,7 @@ const processStatusChecker = (processId) => fetch(`${config.orchestratorApi}/${e
3629
3629
  headers: {
3630
3630
  "Content-Type": "application/json",
3631
3631
  },
3632
- });
3632
+ }).then((response) => response.json());
3633
3633
  /**
3634
3634
  * This fetches from the callback endpoint.
3635
3635
  *
@@ -3645,7 +3645,7 @@ const processCallbackFetcher = (processId, processName, processCallbackUrl) => f
3645
3645
  processId,
3646
3646
  processName,
3647
3647
  })
3648
- });
3648
+ }).then((response) => response.json());
3649
3649
  /**
3650
3650
  * Hook for handling async processes on client.
3651
3651
  *
@@ -3663,17 +3663,11 @@ function useClientProcessBase({ processId, processName, processCallbackUrl, base
3663
3663
  throw new Error("No processId");
3664
3664
  if (!processName)
3665
3665
  throw new Error("No processName");
3666
- // ! remove
3667
- console.log('[DEBUG] Found process here: ', processId, processName);
3668
3666
  const statusResponse = await processStatusChecker(processId);
3669
- // ! remove
3670
- console.log('[DEBUG] Status response: ', statusResponse);
3671
3667
  // Handled! Return the proper response too
3672
3668
  if (statusResponse.status === "handled") {
3673
3669
  const response = await processCallbackFetcher(processId, processName, processCallbackUrl);
3674
3670
  setStatus("handled");
3675
- // ! remove
3676
- console.log('[DEBUG] Callback response: ', response);
3677
3671
  return response;
3678
3672
  }
3679
3673
  // Pending or failed