custom element for embedding Bluesky posts and feeds mary-ext.github.io/bluesky-embed
typescript npm bluesky atcute
7
fork

Configure Feed

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

fix: leftovers

Mary 8b202684 0181e634

+6 -11
+4 -4
packages/bluesky-profile-card-embed/README.md
··· 60 60 import 'bluesky-profile-card-embed/style.css'; 61 61 import 'bluesky-profile-card-embed/themes/light.css'; 62 62 63 - // fetch the post 63 + // fetch the profile 64 64 const controller = new AbortController(); 65 - const data = await fetchPost({ 65 + const data = await fetchProfileCard({ 66 66 actor: `did:plc:ragtjsm2j2vknwkz3zp4oxrd`, 67 67 signal: controller.signal, 68 68 }); 69 69 70 - // render the post 70 + // render the profile 71 71 const html = renderProfileCard(data); 72 72 return ( 73 73 <bluesky-profile-card 74 74 actor={data.profile?.did} 75 75 dangerouslySetInnerHTML={{ __html: html }} 76 - ></bluesky-post> 76 + ></bluesky-profile-card> 77 77 ); 78 78 ``` 79 79
-5
packages/bluesky-profile-card-embed/lib/core.ts
··· 20 20 */ 21 21 signal?: AbortSignal; 22 22 /** 23 - * Include pinned posts 24 - * @default false 25 - */ 26 - includePins?: boolean; 27 - /** 28 23 * Allow unauthenticated viewing 29 24 * @default false 30 25 */
+2 -2
packages/bluesky-profile-card-embed/src/app.tsx
··· 29 29 }; 30 30 }, [actor]); 31 31 32 - return <div class="app">{state && <BlueskyPost data={state.data} />}</div>; 32 + return <div class="app">{state && <BlueskyProfileCard data={state.data} />}</div>; 33 33 }; 34 34 35 35 export default App; 36 36 37 - const BlueskyPost = ({ data }: { data: ProfileCardData }) => { 37 + const BlueskyProfileCard = ({ data }: { data: ProfileCardData }) => { 38 38 const html = useMemo(() => renderProfileCard(data), [data, renderProfileCard]); 39 39 40 40 return (