Skip to content

Commit

Permalink
Merge pull request #1676 from ClimateWatch-Vizzuality/ghg-historical-…
Browse files Browse the repository at this point in the history
…emissions-info

Update GHG Emissions 's US emissions metadata key
  • Loading branch information
SARodrigues committed Aug 22, 2023
2 parents 7a8c464 + 8482756 commit 9dea770
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions app/javascript/app/components/ghg-emissions/ghg-emissions.js
Original file line number Diff line number Diff line change
Expand Up @@ -209,11 +209,17 @@ function GhgEmissionsContainer(props) {
const handleInfoClick = () => {
let { label: source } = selected.sourcesSelected || {};
if (source) {
if (source.startsWith('UNFCCC')) source = 'UNFCCC';
const slugs = `historical_emissions_${source.replace(' ', '_')}`;
if (source.startsWith('UNFCCC')) {
source = 'historical_emissions_UNFCCC';
} else if (source === 'US State Inventory') {
source = 'historical_emissions_us state inventory';
} else {
source = `historical_emissions_${source.replace(' ', '_')}`;
}

setModalMetadata({
category: 'Historical Emissions',
slugs,
slugs: source,
open: true
});
}
Expand Down

0 comments on commit 9dea770

Please sign in to comment.