Skip to content

Commit

Permalink
Update GHG Emissions 's US emissions metadata key
Browse files Browse the repository at this point in the history
  • Loading branch information
SARodrigues committed Aug 22, 2023
1 parent 7a8c464 commit 8482756
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 8482756

Please sign in to comment.