@planetaexo/design-system 0.77.0 → 0.77.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs +4 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +4 -1
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -11637,7 +11637,7 @@ function Picture(_a) {
|
|
|
11637
11637
|
var _a2, _b2;
|
|
11638
11638
|
const ref = React20__namespace.useRef(null);
|
|
11639
11639
|
const [visible, setVisible] = React20__namespace.useState(eager);
|
|
11640
|
-
const [loaded, setLoaded] = React20__namespace.useState(
|
|
11640
|
+
const [loaded, setLoaded] = React20__namespace.useState(eager);
|
|
11641
11641
|
React20__namespace.useEffect(() => {
|
|
11642
11642
|
if (eager || visible) return;
|
|
11643
11643
|
const el = ref.current;
|
|
@@ -11657,7 +11657,10 @@ function Picture(_a) {
|
|
|
11657
11657
|
io.observe(el);
|
|
11658
11658
|
return () => io.disconnect();
|
|
11659
11659
|
}, [eager, visible, rootMargin]);
|
|
11660
|
+
const prevSrcRef = React20__namespace.useRef(src);
|
|
11660
11661
|
React20__namespace.useEffect(() => {
|
|
11662
|
+
if (prevSrcRef.current === src) return;
|
|
11663
|
+
prevSrcRef.current = src;
|
|
11661
11664
|
setLoaded(false);
|
|
11662
11665
|
}, [src]);
|
|
11663
11666
|
const webp = webpVariantUrl(src);
|