name, width, height, link, file, type, blurhash,
}) {
const [url, setUrl] = useState(null);
+ const [blur, setBlur] = useState(true);
useEffect(() => {
let unmounted = false;
<div className="file-container">
<FileHeader name={name} link={url || link} type={type} external />
<div style={{ height: width !== null ? getNativeHeight(width, height) : 'unset' }} className="image-container">
- { blurhash && <BlurhashCanvas hash={blurhash} punch={1} />}
- { url !== null && <img src={url || link} alt={name} />}
+ { blurhash && blur && <BlurhashCanvas hash={blurhash} punch={1} />}
+ { url !== null && <img onLoad={() => setBlur(false)} src={url || link} alt={name} />}
</div>
</div>
);