first commit
This commit is contained in:
19
packages/plugins/embeds/src/astro/Mastodon.astro
Normal file
19
packages/plugins/embeds/src/astro/Mastodon.astro
Normal file
@@ -0,0 +1,19 @@
|
||||
---
|
||||
/**
|
||||
* Mastodon post embed component for Portable Text
|
||||
*
|
||||
* Wraps astro-embed's MastodonPost component, extracting props from the PT block node.
|
||||
* astro-portabletext passes `node` (not `value`) for custom type components.
|
||||
*/
|
||||
import { MastodonPost } from "astro-embed";
|
||||
import type { MastodonBlock } from "../schemas.js";
|
||||
|
||||
interface Props {
|
||||
node: MastodonBlock;
|
||||
}
|
||||
|
||||
const { node } = Astro.props;
|
||||
const { id } = node;
|
||||
---
|
||||
|
||||
<MastodonPost id={id} />
|
||||
Reference in New Issue
Block a user