From d84fd7d6c18e5f43cc911f1a340e105cb4234a66 Mon Sep 17 00:00:00 2001 From: Filipe Medeiros Date: Tue, 11 Apr 2023 16:05:38 +0100 Subject: [PATCH] fix: links Signed-off-by: Filipe Medeiros --- .../src/components/portableText/BlogPostContent.astro | 2 +- .../components/portableText/components/InlineLink.astro | 9 ++++++--- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/frontend/src/components/portableText/BlogPostContent.astro b/frontend/src/components/portableText/BlogPostContent.astro index b732823..3f0a83b 100644 --- a/frontend/src/components/portableText/BlogPostContent.astro +++ b/frontend/src/components/portableText/BlogPostContent.astro @@ -34,7 +34,7 @@ const components = { h6: Heading6, normal: Paragraph, }, - marks: { + mark: { code: InlineCode, link: InlineLink, }, diff --git a/frontend/src/components/portableText/components/InlineLink.astro b/frontend/src/components/portableText/components/InlineLink.astro index 03df85a..da8050e 100644 --- a/frontend/src/components/portableText/components/InlineLink.astro +++ b/frontend/src/components/portableText/components/InlineLink.astro @@ -2,12 +2,15 @@ import type { PortableTextLink } from '@portabletext/types'; export interface Props { - value?: PortableTextLink; + node: { markDef: PortableTextLink }; } -const { value } = Astro.props; +const { node: value } = Astro.props; --- - +