From 536ee161390d26f233a945206680cade17e6d5e3 Mon Sep 17 00:00:00 2001 From: Christian Beiwinkel Date: Thu, 29 Feb 2024 18:59:30 +0100 Subject: [PATCH] fix profile icons not updating --- src/Controls/Directions/index.jsx | 5 +++-- src/Controls/Isochrones/{index.js => index.jsx} | 0 2 files changed, 3 insertions(+), 2 deletions(-) rename src/Controls/Isochrones/{index.js => index.jsx} (100%) diff --git a/src/Controls/Directions/index.jsx b/src/Controls/Directions/index.jsx index 2cf9cc7..7a1eeb5 100644 --- a/src/Controls/Directions/index.jsx +++ b/src/Controls/Directions/index.jsx @@ -74,10 +74,11 @@ class DirectionsControl extends React.Component { } shouldComponentUpdate(nextProps) { - const { dateTime } = this.props + const { dateTime, profile } = this.props const shouldUpdate = dateTime.type !== nextProps.dateTime.type || - dateTime.value !== nextProps.dateTime.value + dateTime.value !== nextProps.dateTime.value || + profile !== nextProps.profile if (shouldUpdate) { this.props.dispatch(makeRequest()) } diff --git a/src/Controls/Isochrones/index.js b/src/Controls/Isochrones/index.jsx similarity index 100% rename from src/Controls/Isochrones/index.js rename to src/Controls/Isochrones/index.jsx