feat: add fallback placeholder image
This commit is contained in:
@@ -148,4 +148,12 @@ export function cloneProperty<T>(properties: (keyof T)[], sourceElement: T, targ
|
||||
delete targetElement[property]
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
export function convertStringToBase64(input: string) {
|
||||
const encoder = new TextEncoder()
|
||||
const data = encoder.encode(input)
|
||||
const charArray = Array.from(data, byte => String.fromCharCode(byte))
|
||||
const base64 = window.btoa(charArray.join(''))
|
||||
return base64
|
||||
}
|
||||
Reference in New Issue
Block a user