Skip to content

Commit

Permalink
fix(demo): use getDefaultComponent
Browse files Browse the repository at this point in the history
`provideUnhandledTypeComponent` no longer exists
  • Loading branch information
theisel committed May 4, 2023
1 parent 60052d6 commit 53b0937
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions demo/src/components/portabletext/Type.astro
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,13 @@ export type Props = ComponentProps;
const props = Astro.props;
const typeIs = (type: string) => type === props.node._type;
const { provideUnhandledTypeComponent } = usePortableText(props.node);
const { getDefaultComponent } = usePortableText(props.node);
const Cmp = typeIs("jsxCounter")
? JsxCounter
: typeIs("svelteCounter")
? SvelteCounter
: provideUnhandledTypeComponent();
: getDefaultComponent();
---

<Cmp {...props} />

0 comments on commit 53b0937

Please sign in to comment.