We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent d0ef225 commit 5805c24Copy full SHA for 5805c24
src/components/DocumentView/CodeBlock/PlainCodeBlock.tsx
@@ -1,4 +1,5 @@
1
import { DocumentBlockCode, JSONDocument } from '@gitbook/api';
2
+import { useId } from 'react';
3
4
import { CodeBlock } from './CodeBlock';
5
@@ -8,8 +9,10 @@ import { CodeBlock } from './CodeBlock';
8
9
*/
10
export function PlainCodeBlock(props: { code: string; syntax: string }) {
11
const { code, syntax } = props;
12
+ const id = useId();
13
14
const block: DocumentBlockCode = {
15
+ key: id,
16
object: 'block',
17
type: 'code',
18
data: {
0 commit comments