Adjust blur fallback logic
This commit is contained in:
parent
d448c36445
commit
333ea9006f
@ -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,
|
||||
|
||||
@ -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 {...{
|
||||
|
||||
Loading…
Reference in New Issue
Block a user