fix: image blurhash `aspectRatio`

Signed-off-by: Innei <i@innei.in>
This commit is contained in:
Innei 2024-09-27 19:21:29 +08:00
parent c06ff84e39
commit 9239483081
No known key found for this signature in database
GPG Key ID: 0F62D33977F021F7
1 changed files with 3 additions and 7 deletions

View File

@ -287,13 +287,9 @@ const FallbackableImage: FC<
{isLoading && !isAllError && (
<div className="center absolute inset-0 size-full">
{blurhash ? (
<Blurhash
hash={blurhash}
resolutionX={32}
resolutionY={32}
className="!size-full"
style={{ aspectRatio: `${props.width} / ${props.height}` }}
/>
<div style={{ aspectRatio: `${props.width} / ${props.height}` }} className="w-full">
<Blurhash hash={blurhash} resolutionX={32} resolutionY={32} className="!size-full" />
</div>
) : (
<i className="i-mgc-loading-3-cute-re size-8 animate-spin text-white/80" />
)}