atproto explorer pdsls.dev
atproto tool

prevent button layout shift

juli.ee b550be27 fbf4a28e

verified
Changed files
+11 -1
src
components
+11 -1
src/components/json.tsx
···
import { isCid, isDid, isNsid, Nsid } from "@atcute/lexicons/syntax";
import { A, useNavigate, useParams } from "@solidjs/router";
-
import { createEffect, createSignal, ErrorBoundary, For, Show } from "solid-js";
+
import { createEffect, createSignal, ErrorBoundary, For, on, Show } from "solid-js";
import { setNotif } from "../layout";
import { resolveLexiconAuthority } from "../utils/api";
import { ATURI_RE } from "../utils/types/at-uri";
···
createEffect(() => {
if (hideMedia()) setHide(hideMedia());
});
+
+
createEffect(
+
on(
+
hide,
+
(value) => {
+
if (value === false) setMediaLoaded(false);
+
},
+
{ defer: true },
+
),
+
);
const isBlob = props.data.$type === "blob";
const isBlobContext = isBlob || props.parentIsBlob;