From 9436386023e17858a4270998e24686a373e30b6a Mon Sep 17 00:00:00 2001 From: Nancy Verma Date: Fri, 29 May 2026 15:19:58 +0530 Subject: [PATCH] Add MarkdownBio component for rendering bio content --- src/components/profile/MarkdownBio.tsx | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 src/components/profile/MarkdownBio.tsx diff --git a/src/components/profile/MarkdownBio.tsx b/src/components/profile/MarkdownBio.tsx new file mode 100644 index 0000000..9421d58 --- /dev/null +++ b/src/components/profile/MarkdownBio.tsx @@ -0,0 +1,21 @@ +"use client"; + +import ReactMarkdown from 'react-markdown'; +import DOMPurify from 'dompurify'; +import rehypeRaw from 'rehype-raw'; +import remarkGfm from 'remark-gfm'; +import styles from './Profile.module.css'; + +interface MarkdownBioProps { + bio?: string; +} + +export default function MarkdownBio({ bio }: MarkdownBioProps) { + return ( +
+ + {DOMPurify.sanitize(bio || "No biography details supplied yet.")} + +
+ ); +}