@bbearai/react 0.4.4 → 0.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.js +5 -0
- package/dist/index.mjs +5 -0
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -2120,6 +2120,11 @@ function useImageAttachments(uploadFn, maxImages, bucket = "screenshots") {
|
|
|
2120
2120
|
setImages((prev) => prev.map(
|
|
2121
2121
|
(img) => img.id === id ? { ...img, remoteUrl: url, status: url ? "done" : "error" } : img
|
|
2122
2122
|
));
|
|
2123
|
+
}).catch((err) => {
|
|
2124
|
+
console.error("BugBear: Image upload failed", err);
|
|
2125
|
+
setImages((prev) => prev.map(
|
|
2126
|
+
(img) => img.id === id ? { ...img, status: "error" } : img
|
|
2127
|
+
));
|
|
2123
2128
|
});
|
|
2124
2129
|
}
|
|
2125
2130
|
}, [images.length, maxImages, uploadFn, bucket]);
|
package/dist/index.mjs
CHANGED
|
@@ -2081,6 +2081,11 @@ function useImageAttachments(uploadFn, maxImages, bucket = "screenshots") {
|
|
|
2081
2081
|
setImages((prev) => prev.map(
|
|
2082
2082
|
(img) => img.id === id ? { ...img, remoteUrl: url, status: url ? "done" : "error" } : img
|
|
2083
2083
|
));
|
|
2084
|
+
}).catch((err) => {
|
|
2085
|
+
console.error("BugBear: Image upload failed", err);
|
|
2086
|
+
setImages((prev) => prev.map(
|
|
2087
|
+
(img) => img.id === id ? { ...img, status: "error" } : img
|
|
2088
|
+
));
|
|
2084
2089
|
});
|
|
2085
2090
|
}
|
|
2086
2091
|
}, [images.length, maxImages, uploadFn, bucket]);
|