Skip to content

Commit

Permalink
[v3] remove intersection-observer polyfill (#3177)
Browse files Browse the repository at this point in the history
  • Loading branch information
87xie authored Aug 31, 2024
1 parent d5d89a0 commit 57f3963
Show file tree
Hide file tree
Showing 6 changed files with 10 additions and 24 deletions.
5 changes: 5 additions & 0 deletions .changeset/clever-dots-unite.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'nextra-theme-docs': patch
---

Remove intersection-observer polyfill
1 change: 0 additions & 1 deletion examples/swr-site/components/video.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import { useCallback, useEffect, useRef } from 'react'
import { useInView } from 'react-intersection-observer'
import 'intersection-observer'

export default function Video({ src, caption, ratio }) {
const [inViewRef, inView] = useInView({ threshold: 1 })
Expand Down
1 change: 0 additions & 1 deletion examples/swr-site/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
"types:check": "tsc --noEmit"
},
"dependencies": {
"intersection-observer": "^0.10.0",
"markdown-to-jsx": "^6.11.4",
"next": "^14.2.5",
"nextra": "workspace:*",
Expand Down
1 change: 0 additions & 1 deletion packages/nextra-theme-docs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,6 @@
"clsx": "^2.0.0",
"escape-string-regexp": "^5.0.0",
"flexsearch": "^0.7.43",
"intersection-observer": "^0.12.2",
"next-themes": "^0.3.0",
"scroll-into-view-if-needed": "^3.1.0",
"zod": "^3.22.3"
Expand Down
1 change: 0 additions & 1 deletion packages/nextra-theme-docs/src/contexts/active-anchor.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import type { Dispatch, ReactElement, ReactNode, SetStateAction } from 'react'
import 'intersection-observer'
import { createContext, useContext, useRef, useState } from 'react'
import { IS_BROWSER } from '../constants'

Expand Down
25 changes: 5 additions & 20 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 57f3963

Please sign in to comment.