|
|
@@ -1,4 +1,4 @@
|
|
|
-import { useState, useEffect, createRef, useRef } from 'react'
|
|
|
+import { useState, useEffect, useRef } from 'react'
|
|
|
import PropTypes from 'prop-types'
|
|
|
import scrollIntoViewIfNeeded from 'scroll-into-view-if-needed'
|
|
|
import classNames from 'classnames'
|
|
|
@@ -18,7 +18,7 @@ function OutlineItem({ outlineItem, jumpToLine, highlightedLine }) {
|
|
|
const { t } = useTranslation()
|
|
|
|
|
|
const [expanded, setExpanded] = useState(true)
|
|
|
- const titleElementRef = createRef()
|
|
|
+ const titleElementRef = useRef()
|
|
|
const isHighlightedRef = useRef(false)
|
|
|
|
|
|
const mainItemClasses = classNames('outline-item', {
|