Skip to content
This repository was archived by the owner on May 20, 2025. It is now read-only.

Commit 100adaa

Browse files
committed
type error for doc toc
1 parent 04431bb commit 100adaa

File tree

2 files changed

+4
-11
lines changed

2 files changed

+4
-11
lines changed

src/components/layout/DocToC.tsx

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -26,10 +26,9 @@ const DocToC = ({ doc }: { doc: Doc }) => {
2626
const [activeIndex, setActiveIndex] = useState(-1)
2727

2828
useEffect(() => {
29-
const headings = document
30-
.querySelectorAll<HTMLHeadingElement>('h2.md-content-header')
31-
.values()
32-
.toArray()
29+
const headings = Array.from(
30+
document.querySelectorAll<HTMLHeadingElement>('h2.md-content-header'),
31+
)
3332

3433
const options = {
3534
root: null,

src/components/layout/DocTracingBeam.tsx

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,7 @@
11
'use client'
22

33
import React, { useEffect, useRef, useState } from 'react'
4-
import {
5-
motion,
6-
useTransform,
7-
useSpring,
8-
useMotionValue,
9-
MotionValue,
10-
} from 'framer-motion'
4+
import { motion, useSpring, MotionValue } from 'framer-motion'
115
import { cn } from '@/lib/utils'
126

137
export const DocTracingBeam = ({

0 commit comments

Comments
 (0)