Fix regional bathymetry context labels
This commit is contained in:
@@ -853,11 +853,17 @@ export function MapWorkspace({
|
||||
- new Date(activeTemporalSeries[0].observed_at ?? 0).getTime() <= 7 * 24 * 60 * 60 * 1000
|
||||
|
||||
useEffect(() => {
|
||||
onSetContextSourceLabel(
|
||||
analysisMode === 'evolution' ? activeTemporalSeriesGroup?.label ?? null : null,
|
||||
)
|
||||
const contextSourceLabel = analysisMode === 'evolution' ? activeTemporalSeriesGroup?.label ?? null
|
||||
: regionalBathymetryThemeActive ? 'VHA-dwarsprofielen Vlaanderen'
|
||||
: null
|
||||
onSetContextSourceLabel(contextSourceLabel)
|
||||
return () => onSetContextSourceLabel(null)
|
||||
}, [activeTemporalSeriesGroup?.label, analysisMode, onSetContextSourceLabel])
|
||||
}, [
|
||||
activeTemporalSeriesGroup?.label,
|
||||
analysisMode,
|
||||
onSetContextSourceLabel,
|
||||
regionalBathymetryThemeActive,
|
||||
])
|
||||
|
||||
const themeResults = useMemo(
|
||||
() =>
|
||||
|
||||
@@ -5,6 +5,10 @@ import type {
|
||||
VectorSelectionMetric,
|
||||
VectorSelectionResponse,
|
||||
} from '../../types'
|
||||
import {
|
||||
FLANDERS_WORKSPACE_LABEL,
|
||||
FLANDERS_WORKSPACE_PROJECT_NAME,
|
||||
} from '../../config/primaryFocus'
|
||||
|
||||
const MOL_PROJECT_NAME = 'Mol Municipality Workbench'
|
||||
const KEMPEN_PROJECT_NAME = 'Kempen Regional Workbench'
|
||||
@@ -16,6 +20,9 @@ export function operationalScopeProjectLabel(project: ProjectRead): string {
|
||||
if (project.name === KEMPEN_PROJECT_NAME) {
|
||||
return 'Kempen (28 gemeenten)'
|
||||
}
|
||||
if (project.name === FLANDERS_WORKSPACE_PROJECT_NAME) {
|
||||
return FLANDERS_WORKSPACE_LABEL
|
||||
}
|
||||
return project.name
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user