Skip to content

Commit

Permalink
Front: Unmount Blurhash on image load
Browse files Browse the repository at this point in the history
  • Loading branch information
Arthi-chaud committed May 19, 2024
1 parent 6ebe601 commit 0dc891c
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion front/src/components/illustration.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,18 @@ const Illustration = (props: IllustrationProps) => {
/>
</Fade>
{blurhash && (
<Fade in={loadingState !== "errored"} unmountOnExit>
<Fade
in={
isSSR()
? loadingState !== "errored"
: loadingState !== "finished"
}
unmountOnExit
timeout={{
// Hack to avoid blurhash exiting before image is painted
exit: theme.transitions.duration.leavingScreen * 2,
}}
>
<Box
style={{
position: "absolute",
Expand Down

0 comments on commit 0dc891c

Please sign in to comment.