this.setState({ video: index })}
>
@@ -208,8 +211,9 @@ class TemplateCover extends React.Component {
{Array.isArray(this.props.cover.description) ? (
- this.props.cover.description.map((e) => (
+ this.props.cover.description.map((e, index) => (
@@ -230,6 +234,7 @@ class TemplateCover extends React.Component {
{videos &&
videos.slice(0, 2).map((media, index) => (
@@ -243,6 +248,7 @@ class TemplateCover extends React.Component {
{videos.length > 2 &&
this.props.cover.videos.slice(2, 4).map((media, index) => (
diff --git a/src/components/atoms/CoverIcon.js b/src/components/atoms/CoverIcon.js
index 44c3fde..0fee807 100644
--- a/src/components/atoms/CoverIcon.js
+++ b/src/components/atoms/CoverIcon.js
@@ -8,7 +8,7 @@ const CoverIcon = ({ isActive, isDisabled, onClickHandler }) => {
return (
);
};
diff --git a/src/components/atoms/SitesIcon.js b/src/components/atoms/SitesIcon.js
index 4183ffc..ccb48a6 100644
--- a/src/components/atoms/SitesIcon.js
+++ b/src/components/atoms/SitesIcon.js
@@ -8,7 +8,7 @@ const SitesIcon = ({ isActive, isDisabled, onClickHandler }) => {
return (
);
};
diff --git a/src/components/controls/FilterListPanel.js b/src/components/controls/FilterListPanel.js
index 9d02e9b..52376da 100644
--- a/src/components/controls/FilterListPanel.js
+++ b/src/components/controls/FilterListPanel.js
@@ -59,11 +59,13 @@ function FilterListPanel({
onClickCheckbox={() => onSelectFilter(key, matchingKeys)}
color={assignedColor}
/>
- {Object.keys(children).length > 0
- ? Object.entries(children).map((filter) =>
+ {Object.keys(children).length > 0 ? (
+
+ {Object.entries(children).map((filter) =>
createNodeComponent(filter, depth + 1)
- )
- : null}
+ )}
+
+ ) : null}
);
}
diff --git a/src/components/controls/atoms/TelegramEmbed.js b/src/components/controls/atoms/TelegramEmbed.js
index c874741..755bde1 100644
--- a/src/components/controls/atoms/TelegramEmbed.js
+++ b/src/components/controls/atoms/TelegramEmbed.js
@@ -68,7 +68,7 @@ class TelegramEmbed extends Component {
);
}
- componentWillReceiveProps({ src }) {
+ UNSAFE_componentWillReceiveProps({ src }) {
if (this.state.src !== src) {
this.urlObj.href = src;
const id = `telegram-post${this.urlObj.pathname.replace(
diff --git a/src/components/space/carto/Map.js b/src/components/space/carto/Map.js
index 51c619a..580249c 100644
--- a/src/components/space/carto/Map.js
+++ b/src/components/space/carto/Map.js
@@ -68,7 +68,7 @@ class Map extends React.Component {
}
}
- componentWillReceiveProps(nextProps) {
+ UNSAFE_componentWillReceiveProps(nextProps) {
if (!isIdentical(nextProps.domain.locations, this.props.domain.locations)) {
this.loadClusterData(nextProps.domain.locations);
}
diff --git a/src/components/space/carto/atoms/SatelliteOverlayToggle.js b/src/components/space/carto/atoms/SatelliteOverlayToggle.js
index a08d4d9..226bf35 100644
--- a/src/components/space/carto/atoms/SatelliteOverlayToggle.js
+++ b/src/components/space/carto/atoms/SatelliteOverlayToggle.js
@@ -17,7 +17,7 @@ const SatelliteOverlayToggle = ({
style={{ backgroundImage: `url(${mapImg}` }}
onClick={reset}
>
-
{copy[language].tiles.default}
+
{copy[language].tiles.default}
) : (
)}
diff --git a/src/components/time/Categories.js b/src/components/time/Categories.js
index 74e7074..f5a8b41 100644
--- a/src/components/time/Categories.js
+++ b/src/components/time/Categories.js
@@ -73,7 +73,10 @@ class TimelineCategories extends React.Component {
className="drag-grabber"
x={dims.marginLeft}
y={dims.marginTop}
- width={dims.width - dims.marginLeft - dims.width_controls}
+ width={Math.max(
+ 0,
+ dims.width - dims.marginLeft - dims.width_controls
+ )}
height={dims.contentHeight}
/>
diff --git a/src/components/time/Timeline.js b/src/components/time/Timeline.js
index 887cfc8..f5cf223 100644
--- a/src/components/time/Timeline.js
+++ b/src/components/time/Timeline.js
@@ -44,7 +44,7 @@ class Timeline extends React.Component {
this.addEventListeners();
}
- componentWillReceiveProps(nextProps) {
+ UNSAFE_componentWillReceiveProps(nextProps) {
if (hash(nextProps) !== hash(this.props)) {
this.setState({
timerange: nextProps.timeline.range,
diff --git a/src/components/time/atoms/Clip.js b/src/components/time/atoms/Clip.js
index bb10a4a..6d82349 100644
--- a/src/components/time/atoms/Clip.js
+++ b/src/components/time/atoms/Clip.js
@@ -5,7 +5,7 @@ const TimelineClip = ({ dims }) => (
diff --git a/src/components/time/atoms/Labels.js b/src/components/time/atoms/Labels.js
index 8f35fd9..60939fe 100644
--- a/src/components/time/atoms/Labels.js
+++ b/src/components/time/atoms/Labels.js
@@ -4,24 +4,24 @@ const TimelineLabels = ({ dims, timelabels }) => {
return (
-
+
{timelabels[0]}