🌟 Code Cleanup

This commit is contained in:
callumok2004
2021-06-21 03:56:13 +01:00
parent b169bbc15d
commit f2a5ab9074
3 changed files with 103 additions and 115 deletions

View File

@@ -1,3 +1,13 @@
import imageToBase64 from "image-to-base64";
export const encodeBase64 = async (url: string): Promise<string> => await imageToBase64(url);
export const encodeBase64 = async (url: string): Promise<string> => {
let response = "";
try {
response = await imageToBase64(url);
} catch (e) {
console.log(e)
}
return response;
}