Skip to content

Commit

Permalink
Merge pull request #1422 from ClimateWatch-Vizzuality/fix-ndcs-embed
Browse files Browse the repository at this point in the history
fix ndcs embed, use legacy component when feature disabled
  • Loading branch information
tsubik authored Apr 1, 2021
2 parents a2c0da8 + 728c56a commit 108a325
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion app/javascript/app/routes/embed-routes/embed-routes.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import { createElement } from 'react';
import { Redirect } from 'react-router-dom';

import NDCSEnhancementsViz from 'components/ndcs/ndcs-enhancements-viz';
import NDCSEnhancementsLegacyViz from 'components/ndcs/ndcs-enhancements-legacy-viz';
import GhgEmissionsGraph from 'components/ghg-emissions';
import CompareGhgChart from 'components/compare/compare-ghg-chart';
import CountryGhg from 'components/country/country-ghg';
Expand All @@ -21,10 +22,15 @@ import NDCSExploreMap from 'components/ndcs/ndcs-explore-map';
import NDCOverviewSection from 'components/ndcs/ndcs-overview-section';
import KeyVisualizationsTable from 'components/key-visualizations/key-visualizations-table';

const FEATURE_NDC_ENHANCEMENTS =
process.env.FEATURE_NDC_ENHANCEMENTS === 'true';

export default [
{
path: '/embed/2020-ndc-tracker',
component: NDCSEnhancementsViz,
component: FEATURE_NDC_ENHANCEMENTS
? NDCSEnhancementsViz
: NDCSEnhancementsLegacyViz,
exact: true
},
{
Expand Down

0 comments on commit 108a325

Please sign in to comment.