diff --git a/website/package-lock.json b/website/package-lock.json index 56dc0199d..235ff5833 100644 --- a/website/package-lock.json +++ b/website/package-lock.json @@ -9914,6 +9914,11 @@ } } }, + "intersection-observer": { + "version": "0.5.1", + "resolved": "https://registry.npmjs.org/intersection-observer/-/intersection-observer-0.5.1.tgz", + "integrity": "sha512-Zd7Plneq82kiXFixs7bX62YnuZ0BMRci9br7io88LwDyF3V43cQMI+G5IiTlTNTt+LsDUppl19J/M2Fp9UkH6g==" + }, "into-stream": { "version": "3.1.0", "resolved": "http://registry.npmjs.org/into-stream/-/into-stream-3.1.0.tgz", diff --git a/website/package.json b/website/package.json index 8f9f6ce6b..3835f531e 100644 --- a/website/package.json +++ b/website/package.json @@ -40,6 +40,7 @@ "gatsby-transformer-remark": "^2.2.5", "gatsby-transformer-sharp": "^2.1.13", "html-to-react": "^1.3.4", + "intersection-observer": "^0.5.1", "node-sass": "^4.11.0", "parse-numeric-range": "0.0.2", "prismjs": "^1.15.0", diff --git a/website/src/components/section.js b/website/src/components/section.js index c422877b1..e1d009a99 100644 --- a/website/src/components/section.js +++ b/website/src/components/section.js @@ -1,6 +1,7 @@ import React, { useEffect } from 'react' import PropTypes from 'prop-types' import classNames from 'classnames' +import 'intersection-observer' import { useInView } from 'react-intersection-observer' import { window } from 'browser-monads'