diff --git a/app/(routes)/(main)/blog/[slug]/page.tsx b/app/(routes)/(main)/blog/[slug]/page.tsx index a84d06f..d321345 100644 --- a/app/(routes)/(main)/blog/[slug]/page.tsx +++ b/app/(routes)/(main)/blog/[slug]/page.tsx @@ -8,7 +8,6 @@ import Image from 'next/image'; import { Badge } from '@/components/ui/badge'; import Markdown from '@/components/markdown'; import TableOfContents from '@/app/_components/_main/table-of-contents'; -import MarkdownCopyListener from '@/app/_components/_main/markdown-copy-listener'; export async function generateMetadata({ params, @@ -81,7 +80,6 @@ export default async function Page({ params }: { params: { slug: string } }) { )} - {headings.length > 0 && } ); diff --git a/components/markdown.tsx b/components/markdown.tsx index 9e6759e..65922da 100644 --- a/components/markdown.tsx +++ b/components/markdown.tsx @@ -5,6 +5,7 @@ import DOMPurify from 'isomorphic-dompurify'; import hljs from 'highlight.js/lib/core'; import '@/styles/hljs/github-dark.css'; import { escapeText } from '@/lib/utils'; +import MarkdownCopyListener from '@/app/_components/_main/markdown-copy-listener'; const languages = { plaintext: () => import('highlight.js/lib/languages/plaintext'), @@ -75,7 +76,7 @@ const Markdown = ({ markdown }: { markdown: string }) => { }, ); - return ( + return <>
{ }), }} >
- ); + + }; export default Markdown;