Skip to content
Permalink
Browse files

Countryclick fix

  • Loading branch information...
corradio committed Oct 24, 2018
1 parent d395d4f commit 5c02222613c30628e24203057225c25a3ec9d30a
Showing with 2 additions and 3 deletions.
  1. +2 −3 web/src/main.js
@@ -802,6 +802,8 @@ if (typeof zoneMap !== 'undefined') {
}
})
.onCountryClick((d) => {
// Analytics
thirdPartyServices.track('countryClick', { countryCode: d.countryCode });
dispatchApplication('isLeftPanelCollapsed', false);
dispatchApplication('showPageState', 'country'); // TODO(olc): infer in reducer?
if (getState().application.selectedZoneName !== d.countryCode) {
@@ -1266,9 +1268,6 @@ observe(state => state.application.showPageState, (showPageState, state) => {
// Observe for zone change (for example after map click)
observe(state => state.application.selectedZoneName, (selectedZoneName, state) => {
if (!selectedZoneName) { return; }
// Analytics
thirdPartyServices.track('countryClick', { countryCode: selectedZoneName });

// Render
renderCountryTable(state);
renderGauges(state);

0 comments on commit 5c02222

Please sign in to comment.
You can’t perform that action at this time.