Skip to content

Commit

Permalink
fix: react-notion-x imports
Browse files Browse the repository at this point in the history
  • Loading branch information
transitive-bullshit committed Nov 1, 2024
1 parent b7fb2ec commit 32fbb4b
Show file tree
Hide file tree
Showing 3 changed files with 31 additions and 26 deletions.
2 changes: 1 addition & 1 deletion packages/react-notion-x/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@
"react-lazy-images": "^1.1.0",
"react-modal": "^3.14.3",
"react-pdf": "^9.1.1",
"react-use": "^17.3.1"
"react-use": "^17.5.1"
},
"devDependencies": {
"@types/lodash.throttle": "^4.1.6",
Expand Down
4 changes: 2 additions & 2 deletions packages/react-notion-x/src/third-party/code.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import copyToClipboard from 'clipboard-copy'
import { type CodeBlock } from 'notion-types'
import { getBlockTitle } from 'notion-utils'
// eslint-disable-next-line import/no-duplicates, no-duplicate-imports
import { highlightElement } from 'prismjs'
import prism from 'prismjs'
import * as React from 'react'

import { Text } from '../components/text'
Expand Down Expand Up @@ -55,7 +55,7 @@ export function Code({
React.useEffect(() => {
if (codeRef.current) {
try {
highlightElement(codeRef.current)
prism.highlightElement(codeRef.current)
} catch (err) {
console.warn('prismjs highlight error', err)
}
Expand Down
51 changes: 28 additions & 23 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 32fbb4b

Please sign in to comment.