@@ -7,7 +7,6 @@ import Footer from '../../components/Footer'
77import ToC from '../../components/TableOfContents'
88import NavMenu from '../../components/NavMenu'
99import TopicSection from '../../components/TopicSection'
10- // import { styles } from 'prism-react-renderer/themes/oceanicNext'
1110
1211const SecondaryNavBar = styled . nav `
1312 display: flex;
@@ -41,12 +40,11 @@ export default function Index({ data }) {
4140 const [ activeSection , setActiveSection ] = useState ( null )
4241
4342 useEffect ( ( ) => {
44- window . addEventListener ( 'scroll' , throttle ( handleScroll , 500 ) )
45- window . addEventListener ( 'scroll' , throttle ( handleObserver , 500 ) )
43+ window . addEventListener ( 'scroll' , throttle ( handleScroll , 300 ) )
44+ window . addEventListener ( 'scroll' , throttle ( handleObserver , 300 ) )
4645 return ( ) => {
47- window . removeEventListener ( 'scroll' , throttle ( handleScroll , 500 ) )
48- // TODO: this should be here, right?
49- window . addEventListener ( 'scroll' , throttle ( handleObserver , 500 ) )
46+ window . removeEventListener ( 'scroll' , throttle ( handleScroll , 300 ) )
47+ window . addEventListener ( 'scroll' , throttle ( handleObserver , 300 ) )
5048 }
5149 } , [ data ] )
5250
0 commit comments