Skip to content

Commit 32fbb4b

Browse files
fix: react-notion-x imports
1 parent b7fb2ec commit 32fbb4b

File tree

3 files changed

+31
-26
lines changed

3 files changed

+31
-26
lines changed

packages/react-notion-x/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@
6666
"react-lazy-images": "^1.1.0",
6767
"react-modal": "^3.14.3",
6868
"react-pdf": "^9.1.1",
69-
"react-use": "^17.3.1"
69+
"react-use": "^17.5.1"
7070
},
7171
"devDependencies": {
7272
"@types/lodash.throttle": "^4.1.6",

packages/react-notion-x/src/third-party/code.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ import copyToClipboard from 'clipboard-copy'
1414
import { type CodeBlock } from 'notion-types'
1515
import { getBlockTitle } from 'notion-utils'
1616
// eslint-disable-next-line import/no-duplicates, no-duplicate-imports
17-
import { highlightElement } from 'prismjs'
17+
import prism from 'prismjs'
1818
import * as React from 'react'
1919

2020
import { Text } from '../components/text'
@@ -55,7 +55,7 @@ export function Code({
5555
React.useEffect(() => {
5656
if (codeRef.current) {
5757
try {
58-
highlightElement(codeRef.current)
58+
prism.highlightElement(codeRef.current)
5959
} catch (err) {
6060
console.warn('prismjs highlight error', err)
6161
}

pnpm-lock.yaml

Lines changed: 28 additions & 23 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)