Skip to content

Commit

Permalink
Fix build error
Browse files Browse the repository at this point in the history
  • Loading branch information
mengqi92 committed Apr 3, 2024
1 parent 125d04e commit 270f468
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 27 deletions.
23 changes: 0 additions & 23 deletions src/app/_components/clipboard-copy.css

This file was deleted.

8 changes: 5 additions & 3 deletions src/app/_components/code-block.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,12 @@

import clsx from "clsx";
import ClipboardCopy from "./clipboard-copy";
// import './clipboard-copy.css'

const CodeBlock = ({ className, children, raw, ...props }) => {
console.log('raw: ', raw);
interface CodeBlockProps extends React.HTMLAttributes<HTMLPreElement>{
raw?: string
}

const CodeBlock: React.FC<CodeBlockProps> = ({ className, children, raw, ...props }: CodeBlockProps) => {
return (
<>
<div className="copyCode">
Expand Down
2 changes: 1 addition & 1 deletion src/app/_components/markdown-post.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ const components: MDXComponents = {
blockquote: ({ children }) => <blockquote className="mt-6 bg-slate-50 py-2 border-l-2 pl-6 italic">{children}</blockquote>,
ul: ({ children }) => <ul className="my-6 ml-6 list-disc [&>li]:mt-2">{children}</ul>,
li: ({ children }) => <li className="leading-7 list-outside list-decimal">{children}</li>,
pre: ({ className, children, raw, ...props}) => <CodeBlock children={children} raw={raw} className={className} {...props}/>,
pre: CodeBlock,
code: ({ children }) => <code className="relative my-4 px-[0.3rem] py-[0.2rem] font-mono text-sm">{children}</code>,
lead: ({ children }) => <p className="text-xl text-muted-foreground">{children}</p>,
a: ({ children, href }) => (
Expand Down

0 comments on commit 270f468

Please sign in to comment.