atmosphere explorer pds.ls
tool typescript atproto

simplify isActive condition

handle.invalid d1ace430 4ca7c15b

verified
+2 -3
+1 -1
src/components/json.tsx
··· 230 230 <Show when={!show() && summary()}> 231 231 <button 232 232 type="button" 233 - class="flex items-center gap-0.5 rounded bg-neutral-200 px-1 py-0.5 text-xs whitespace-nowrap text-neutral-500 hover:bg-neutral-300 hover:text-neutral-700 dark:bg-neutral-700 dark:text-neutral-400 dark:hover:bg-neutral-600 dark:hover:text-neutral-200" 233 + class="flex items-center gap-0.5 rounded bg-neutral-200 px-1 text-xs whitespace-nowrap text-neutral-500 hover:bg-neutral-300 hover:text-neutral-700 sm:py-0.5 dark:bg-neutral-700 dark:text-neutral-400 dark:hover:bg-neutral-600 dark:hover:text-neutral-200" 234 234 onclick={() => setShow(true)} 235 235 > 236 236 <span class="iconify lucide--chevron-right"></span>
+1 -2
src/views/record.tsx
··· 384 384 error?: boolean; 385 385 }) => { 386 386 const isActive = () => { 387 - if (!location.hash && props.tab === "record") return true; 388 - if (props.tab === "record") return location.hash.startsWith("#record"); 387 + if (props.tab === "record") return !location.hash || location.hash.startsWith("#record"); 389 388 if (location.hash === `#${props.tab}`) return true; 390 389 if (props.tab === "schema" && location.hash.startsWith("#schema:")) return true; 391 390 return false;