Removed unused functions & fixed warning

This commit is contained in:
Daniel Cojocea committed 2024-07-08 16:26:08 -04:00
1 parent 31e4c7b110
commit b94d1021c2
2 files changed
+4 -24

No files matched your search

+1 -21
View File
@@ -8,24 +8,4 @@ export const checkImage = (url) => {
const img = new Image();
img.src = url;
return img.naturalWidth !== 0;
};
export const bufferTo64 = (bufferData) => {
const uint8Array = new Uint8Array(bufferData.data);
const blob = new Blob([uint8Array], { type: bufferData.contentType });
return new Promise((resolve) => {
const reader = new FileReader();
reader.onloadend = () => {
resolve(reader.result);
};
reader.readAsDataURL(blob);
});
};
export const bufferToUrl = (buffer) => {
console.log(buffer);
const blob = new Blob([buffer.data], { type: buffer.contentType });
const url = URL.createObjectURL(blob);
return url;
};
};