feat: add advisor/contact flow tables and make Blog.authorId required
Deploy Canina / deploy (push) Successful in 25m44s
Deploy Canina / deploy (push) Successful in 25m44s
This commit is contained in:
1 parent
bb81f2c944
commit
d881dc491e
86 files changed
+507
-4111
No files matched your search
@@ -1,5 +1,6 @@
|
||||
"use client";
|
||||
import React, { useState, useEffect } from "react";
|
||||
import DOMPurify from 'dompurify';
|
||||
import {
|
||||
ChevronRight,
|
||||
Calendar,
|
||||
@@ -18,17 +19,14 @@ import {
|
||||
import Link from 'next/link';
|
||||
import SafeImage from "./SafeImage";
|
||||
import api from "../lib/services/api";
|
||||
import ArticleContentRenderer from "./ArticleContentRenderer";
|
||||
|
||||
|
||||
interface BlogPostClientProps {
|
||||
blog: any;
|
||||
publishedDate: string;
|
||||
authorName: string;
|
||||
sanitizedContent: string;
|
||||
}
|
||||
|
||||
export default function BlogPostClient({ blog, publishedDate, authorName, sanitizedContent }: BlogPostClientProps) {
|
||||
export default function BlogPostClient({ blog, publishedDate, authorName }: BlogPostClientProps) {
|
||||
const [copied, setCopied] = useState(false);
|
||||
const [viewCount, setViewCount] = useState<number>(blog.viewCount || 0);
|
||||
const [commentName, setCommentName] = useState("");
|
||||
@@ -175,10 +173,17 @@ export default function BlogPostClient({ blog, publishedDate, authorName, saniti
|
||||
</div>
|
||||
)}
|
||||
|
||||
{/* Main Rich Content HTML Renderer with In-Article Product Cards */}
|
||||
<ArticleContentRenderer
|
||||
contentHtml={sanitizedContent}
|
||||
relatedProducts={relatedProducts}
|
||||
{/* Main Rich Content HTML Renderer */}
|
||||
<div
|
||||
className="prose prose-base sm:prose-lg max-w-none text-medical-gray-700 leading-loose space-y-5 article-html-content"
|
||||
dangerouslySetInnerHTML={{
|
||||
__html: typeof window !== 'undefined'
|
||||
? DOMPurify.sanitize(blog.content || '', {
|
||||
ADD_TAGS: ['iframe'],
|
||||
ADD_ATTR: ['allow', 'allowfullscreen', 'frameborder', 'scrolling'],
|
||||
})
|
||||
: blog.content || '',
|
||||
}}
|
||||
/>
|
||||
|
||||
{/* Tags Chip Footer */}
|
||||
|
||||
Reference in new issue
Block a user