diff --git a/src/components/ProjectionResult.js b/src/components/ProjectionResult.js index b25a896a..9880336e 100644 --- a/src/components/ProjectionResult.js +++ b/src/components/ProjectionResult.js @@ -19,6 +19,7 @@ function ProjectionResult() { projectionResult: state.projectionResult, })); const { i18n, t } = useTranslation(); + const { forestType } = location; const panes = []; panes.push({ @@ -30,7 +31,7 @@ function ProjectionResult() { const p = r.projections[r.projections.length - 1]; const icons = []; const scenarios = []; - if (projectionMode === 'f') { + if (p && projectionMode === 'f') { if (location.altitudinalZone === p.altitudinalZone) { icons.push(); scenarios.push(t('projectionScenario.today')); @@ -81,9 +82,9 @@ function ProjectionResult() { } }); - return ( + return forestType ? (
- {panes.length > 0 ? ( + {panes.length > 1 ? ( )}
- ); + ) : null; } export default ProjectionResult;