Fix channel-selector thumbnail not updating
Recently changed to `<OptimizedImg>`, which was assuming the `src` never changes. dejavu ... we also hit this issue when implementing the `IntersectionObserver` lazy-loading.
This commit is contained in:
parent
e138673d27
commit
6b2548cc49
1 changed files with 3 additions and 1 deletions
|
@ -89,7 +89,9 @@ function OptimizedImage(props: Props) {
|
|||
} else {
|
||||
setOptimizedSrc(src);
|
||||
}
|
||||
}, []); // eslint-disable-line react-hooks/exhaustive-deps
|
||||
// We only want to run this on (1) initial mount and (2) 'src' change. Nothing else.
|
||||
// eslint-disable-next-line react-hooks/exhaustive-deps
|
||||
}, [src]);
|
||||
|
||||
if (!src) {
|
||||
return null;
|
||||
|
|
Loading…
Reference in a new issue