@betterinternship/components 1.4.2 → 1.4.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.
- package/dist/index.esm.js +3 -0
- package/dist/index.esm.js.map +1 -1
- package/package.json +1 -1
package/dist/index.esm.js
CHANGED
|
@@ -3718,17 +3718,20 @@ function useClientProcess({ caller, loadingMessage, successMessage, failureMessa
|
|
|
3718
3718
|
return;
|
|
3719
3719
|
// Update toast to show current state
|
|
3720
3720
|
if (clientProcess.status === 'pending') {
|
|
3721
|
+
console.log(response.processName, loadingMessage ?? "Loading...");
|
|
3721
3722
|
toast.loading(loadingMessage ?? "Loading...", {
|
|
3722
3723
|
id: response.processId,
|
|
3723
3724
|
duration: Infinity,
|
|
3724
3725
|
});
|
|
3725
3726
|
}
|
|
3726
3727
|
else if (clientProcess.status === 'failed') {
|
|
3728
|
+
console.error(response.processName, failureMessage ?? "Something went wrong.");
|
|
3727
3729
|
toast.error(failureMessage ?? "Something went wrong.", {
|
|
3728
3730
|
id: response.processId
|
|
3729
3731
|
});
|
|
3730
3732
|
}
|
|
3731
3733
|
else if (clientProcess.status === 'handled') {
|
|
3734
|
+
console.warn(response.processName, successMessage ?? "Success!");
|
|
3732
3735
|
toast.success(successMessage ?? "Success!", {
|
|
3733
3736
|
id: response.processId
|
|
3734
3737
|
});
|