{isLoading &&
}
{!hasError ? (

{
setIsLoading(false)
setHasError(false)
setTimeout(() => setDisplayBlurHash(false), 500)
}}
onError={handleImageError}
/>
) : (
{errorPlaceholder}
)}
{displayBlurHash && blurDataUrl && !hasError && (

)}
)
}
const DIGITS = '0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz#$%*+,-.:;=?@[]^_{|}~'
function decodeBlurHashSize(blurHash: string) {
const sizeValue = DIGITS.indexOf(blurHash[0])
const numY = (sizeValue / 9 + 1) | 0
const numX = (sizeValue % 9) + 1
return { numX, numY }
}