Skip to content

Interactive interface for browsing global, full-resolution satellite imagery

bypass `react/no-did-update-set-state` issues so we can set this rule to error

Jason Kentfa1e076c6088
diff --git a/web/js/components/timeline/timeline-axis/timeline-axis.js b/web/js/components/timeline/timeline-axis/timeline-axis.js
index c9a75190e..5252dcfb6 100644
--- a/web/js/components/timeline/timeline-axis/timeline-axis.js
+++ b/web/js/components/timeline/timeline-axis/timeline-axis.js
@@ -510,6 +510,7 @@ class TimelineAxis extends Component {
leftOffset = 0.8;
}
// add updateTimeScale flag to indicate showHover should not fire immediately
+ // eslint-disable-next-line react/no-did-update-set-state
this.setState({
updatedTimeScale: true,
});
diff --git a/web/js/containers/animation-widget.js b/web/js/containers/animation-widget.js
index 6fd1a6864..7587c97d9 100644
--- a/web/js/containers/animation-widget.js
+++ b/web/js/containers/animation-widget.js
@@ -138,6 +138,8 @@ class AnimationWidget extends React.Component {
// yet, try to keep it centered
if (subdailyChange && !userHasMovedWidget) {
const useWidth = subDailyMode ? subdailyWidgetWidth : widgetWidth;
+
+ // eslint-disable-next-line react/no-did-update-set-state
this.setState({
widgetPosition: {
x: (screenWidth / 2) - (useWidth / 2),