atproto explorer
0
fork

Configure Feed

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

refactor map into For

+5 -5
+5 -5
src/views/blob.tsx
··· 1 - import { createSignal, onMount, Show, type Component } from "solid-js"; 1 + import { createSignal, For, onMount, Show, type Component } from "solid-js"; 2 2 import { CredentialManager, XRPC } from "@atcute/client"; 3 3 import { A, query, useParams } from "@solidjs/router"; 4 4 import { setNotice, setPDS } from "../main.jsx"; ··· 53 53 <div class="flex flex-col items-center"> 54 54 <Show when={blobs()}> 55 55 <div class="flex flex-col font-mono"> 56 - {blobs()!.map((cid) => { 57 - return ( 56 + <For each={blobs()}> 57 + {(cid) => ( 58 58 <A 59 59 href={`${pds}/xrpc/com.atproto.sync.getBlob?did=${did}&cid=${cid}`} 60 60 target="_blank" ··· 62 62 > 63 63 <span class="text-lightblue-500">{cid}</span> 64 64 </A> 65 - ); 66 - })} 65 + )} 66 + </For> 67 67 </div> 68 68 </Show> 69 69 <Show when={cursor()}>