Adjust blur fallback logic

This commit is contained in:
Sam Becker 2024-05-06 08:54:56 -05:00
parent d448c36445
commit 333ea9006f
2 changed files with 3 additions and 3 deletions

View File

@ -17,7 +17,7 @@ export default async function UploadPage({ params: { uploadPath } }: Params) {
blobId,
photoFormExif,
imageResizedBase64: imageThumbnailBase64,
} = await extractImageDataFromBlobPath( uploadPath, {
} = await extractImageDataFromBlobPath(uploadPath, {
includeInitialPhotoFields: true,
generateBlurData: true,
generateResizedImage: true,

View File

@ -61,13 +61,13 @@ export default function ImageBlurFallback(props: ImageProps & {
'flex relative',
)}
>
{showPlaceholder || shouldDebugBlur &&
{(showPlaceholder || shouldDebugBlur) &&
<div className={clsx(
'@container',
'absolute inset-0',
'bg-main overflow-hidden',
'transition-opacity duration-300 ease-in',
isLoading || shouldDebugBlur ? 'opacity-100' : 'opacity-0',
(isLoading || shouldDebugBlur) ? 'opacity-100' : 'opacity-0',
)}>
{(BLUR_ENABLED && props.blurDataURL)
? <img {...{