Skip to content

Commit

Permalink
do not rename code block
Browse files Browse the repository at this point in the history
  • Loading branch information
jeremyphilemon committed Feb 13, 2025
1 parent c88c122 commit 841a67e
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions components/code-block.tsx
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
'use client';

interface CodeArtifactProps {
interface CodeBlockProps {
node: any;
inline: boolean;
className: string;
children: any;
}

export function CodeArtifact({
export function CodeBlock({
node,
inline,
className,
children,
...props
}: CodeArtifactProps) {
}: CodeBlockProps) {
if (!inline) {
return (
<div className="not-prose flex flex-col">
Expand Down
4 changes: 2 additions & 2 deletions components/markdown.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@ import Link from 'next/link';
import React, { memo } from 'react';
import ReactMarkdown, { type Components } from 'react-markdown';
import remarkGfm from 'remark-gfm';
import { CodeArtifact } from './code-block';
import { CodeBlock } from './code-block';

const components: Partial<Components> = {
// @ts-expect-error
code: CodeArtifact,
code: CodeBlock,
pre: ({ children }) => <>{children}</>,
ol: ({ node, children, ...props }) => {
return (
Expand Down

0 comments on commit 841a67e

Please sign in to comment.