diff --git a/app/projects/[projectName]/page.tsx b/app/projects/[projectName]/page.tsx index edac820..24d480f 100644 --- a/app/projects/[projectName]/page.tsx +++ b/app/projects/[projectName]/page.tsx @@ -1,12 +1,11 @@ import { projects } from "@/lib/data"; import { Project } from "@/lib/types"; import Chip from "@/components/chip"; +import MarkdownContent from "@/components/markdown-content"; import { Metadata } from "next"; import Image from "next/image"; import { Github, Eye, CloudDownload } from "lucide-react"; import { notFound } from "next/navigation"; -import { remark } from "remark"; -import html from "remark-html"; function getProjectByName(name: string): Project | undefined { const decodedName = decodeURIComponent(name.replace(/\+/g, " ")); @@ -54,13 +53,6 @@ export async function generateMetadata({ }; } -async function getProjectData(project: Project) { - const processedContent = await remark() - .use(html) - .process(project.description); - return processedContent.toString(); -} - export default async function ProjectDetailPage({ params, }: { @@ -68,7 +60,6 @@ export default async function ProjectDetailPage({ }) { const { projectName } = await params; const project = getProjectByName(projectName); - const descriptionHtml = project ? await getProjectData(project) : ""; if (!project) { notFound(); @@ -79,14 +70,16 @@ export default async function ProjectDetailPage({ return (