Skip to content

Kepler.gl is a powerful open source geospatial analysis tool for large-scale data sets.

[Chore] Upgraded waypoint library to support react16 (#453)

Giuseppe Macrì486ec2f24d95
diff --git a/website/package.json b/website/package.json
index dec0e7ee7..f3eb0fe7a 100644
--- a/website/package.json
+++ b/website/package.json
@@ -32,7 +32,7 @@
"react-router-redux": "^4.0.8",
"react-share": "^2.1.1",
"react-swipeable-views": "^0.12.13",
- "react-waypoint": "^8.0.1",
+ "react-waypoint": "^9.0.1",
"redux": "^3.0.4",
"redux-actions": "^1.2.0",
"redux-thunk": "^1.0.0",
diff --git a/website/src/components/common/carousel.js b/website/src/components/common/carousel.js
index 2fb9b4bc8..e86bb2775 100644
--- a/website/src/components/common/carousel.js
+++ b/website/src/components/common/carousel.js
@@ -21,7 +21,7 @@
import React, {PureComponent} from 'react';
import PropTypes from 'prop-types';
import styled from 'styled-components';
-import Waypoint from 'react-waypoint';
+import {Waypoint} from 'react-waypoint';
const Container = styled.div`
position: relative;
diff --git a/website/src/components/common/staggered-scroll-animation.js b/website/src/components/common/staggered-scroll-animation.js
index f2fff3bf4..ba5644420 100644
--- a/website/src/components/common/staggered-scroll-animation.js
+++ b/website/src/components/common/staggered-scroll-animation.js
@@ -20,7 +20,7 @@
import React, {PureComponent} from 'react';
import PropTypes from 'prop-types';
-import Waypoint from 'react-waypoint';
+import {Waypoint} from 'react-waypoint';
import styled from 'styled-components';
const FadeIn = styled.div`
@@ -35,7 +35,7 @@ export default class StaggeredScrollAnimation extends PureComponent {
duration: PropTypes.number,
delay: PropTypes.number,
animateOnce: PropTypes.bool,
- Container: PropTypes.oneOfType([PropTypes.func, PropTypes.string]),
+ Container: PropTypes.oneOfType([PropTypes.object, PropTypes.element, PropTypes.func, PropTypes.string]),
scrollOffsetTop: PropTypes.number
};
@@ -72,7 +72,7 @@ export default class StaggeredScrollAnimation extends PureComponent {
topOffset={scrollOffsetTop}
>
<Container>
- {children.map((item, i) => (
+ {React.Children.map(children, (item, i) => (
<FadeIn key={i} isVisible={isVisible} delay={delay * i}>
{item}
</FadeIn>