Skip to content

Commit 7d54335

Browse files
committed
add markdown and tables to paste
1 parent c6d65a1 commit 7d54335

File tree

6 files changed

+796
-105
lines changed

6 files changed

+796
-105
lines changed

components/block-table.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11

22
import React from 'react';
3-
import { MarkdownLink } from './markdown-link';
3+
import ReactMarkdown from 'react-markdown';
44

55
export default function BlockTable({ value }: { value: { rows: { _key: string; cells: string[] }[] } }) {
66
const { rows } = value;
@@ -14,7 +14,7 @@ export default function BlockTable({ value }: { value: { rows: { _key: string; c
1414
<tr key={row._key}>
1515
{row.cells.map((cell, cellIndex) => (
1616
<td key={cellIndex}>
17-
<MarkdownLink text={cell} />
17+
<ReactMarkdown>{cell}</ReactMarkdown>
1818
</td>
1919
))}
2020
</tr>

components/markdown-link.tsx

Lines changed: 0 additions & 28 deletions
This file was deleted.

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,7 @@
9494
"react-inlinesvg": "^4.2.0",
9595
"react-instantsearch": "^7.16.3",
9696
"react-instantsearch-nextjs": "^1.0.2",
97+
"react-markdown": "^10.1.0",
9798
"react-resizable-panels": "^3.0.6",
9899
"react-syntax-highlighter": "^15.6.6",
99100
"react-twitter-embed": "^4.0.4",

0 commit comments

Comments
 (0)