diff --git a/frontend/app/[locale]/blog/[slug]/PostDetails.tsx b/frontend/app/[locale]/blog/[slug]/PostDetails.tsx index 89c5ab71..7ce07d19 100644 --- a/frontend/app/[locale]/blog/[slug]/PostDetails.tsx +++ b/frontend/app/[locale]/blog/[slug]/PostDetails.tsx @@ -85,8 +85,7 @@ function renderPortableTextSpans( const marks = child?.marks || []; const linkKey = marks.find(mark => linkMap.has(mark)); - let node: React.ReactNode = - marks.length === 0 ? linkifyText(text) : text; + let node: React.ReactNode = marks.length === 0 ? linkifyText(text) : text; for (const mark of marks) { if (linkMap.has(mark)) { @@ -132,53 +131,86 @@ function renderPortableTextSpans( }); } -function renderPortableTextBlock( - block: any, - index: number -): React.ReactNode { +function renderPortableTextBlock(block: any, index: number): React.ReactNode { const children = renderPortableTextSpans(block.children, block.markDefs); const style = block?.style || 'normal'; if (style === 'h1') { return ( -

{children}

+

+ {children} +

); } if (style === 'h2') { return ( -

{children}

+

+ {children} +

); } if (style === 'h3') { return ( -

{children}

+

+ {children} +

); } if (style === 'h4') { return ( -

{children}

+

+ {children} +

); } if (style === 'h5') { return ( -
{children}
+
+ {children} +
); } if (style === 'h6') { return ( -
{children}
+
+ {children} +
); } if (style === 'blockquote') { return ( -
+
{children}
); } return ( -

+

{children}

); @@ -215,11 +247,24 @@ function renderPortableText( j += 1; } + const listClass = + listType === 'ol' ? 'my-4 list-decimal pl-6' : 'my-4 list-disc pl-6'; + const levelClass = level > 1 ? 'ml-6' : ''; nodes.push( listType === 'ol' ? ( -
    {items}
+
    + {items} +
) : ( - + ) ); i = j; @@ -439,193 +484,195 @@ export default async function PostDetails({ return (
- {breadcrumbsJsonLd && ( -