atmosphere explorer
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

remove handle fetching in pds info

Juliet 15587d9f 2434f931

+1 -16
+1 -16
src/views/pds.tsx
··· 10 10 import { Modal } from "../components/modal"; 11 11 import { setPDS } from "../components/navbar"; 12 12 import Tooltip from "../components/tooltip"; 13 - import { resolveDidDoc } from "../utils/api"; 14 13 import { localDateFromTimestamp } from "../utils/date"; 15 14 16 15 const LIMIT = 1000; ··· 56 55 57 56 const RepoCard = (repo: ComAtprotoSyncListRepos.Repo) => { 58 57 const [openInfo, setOpenInfo] = createSignal(false); 59 - const [handle, setHandle] = createSignal<string>(); 60 - 61 - const fetchHandle = async () => { 62 - try { 63 - const doc = await resolveDidDoc(repo.did); 64 - const aka = doc.alsoKnownAs?.find((a) => a.startsWith("at://")); 65 - if (aka) setHandle(aka.replace("at://", "")); 66 - } catch {} 67 - }; 68 58 69 59 return ( 70 60 <div class="flex items-center gap-0.5"> ··· 86 76 </Tooltip> 87 77 </Show> 88 78 <button 89 - onclick={() => { 90 - setOpenInfo(true); 91 - if (!handle()) fetchHandle(); 92 - }} 79 + onclick={() => setOpenInfo(true)} 93 80 class="flex items-center rounded-md p-1.5 hover:bg-neutral-200 active:bg-neutral-300 dark:hover:bg-neutral-700 dark:active:bg-neutral-600" 94 81 > 95 82 <span class="iconify lucide--info text-neutral-600 dark:text-neutral-400"></span> ··· 106 93 </button> 107 94 </div> 108 95 <div class="grid grid-cols-[auto_1fr] items-baseline gap-x-1 gap-y-0.5 text-sm"> 109 - <span class="font-medium">Handle:</span> 110 - <span class="text-neutral-700 dark:text-neutral-300">{handle()}</span> 111 96 <span class="font-medium">Head:</span> 112 97 <span class="wrap-anywhere text-neutral-700 dark:text-neutral-300">{repo.head}</span> 113 98