@@ -33,7 +33,7 @@ export default function MapContainer() {
3333 const theme = useTheme ( ) ;
3434 const dispatch = useAppDispatch ( ) ;
3535
36- const { geoData, mapData, searchBarData, nodes, compartments} = useContext ( DataContext ) ! ;
36+ const { geoData, mapData, searchBarData, nodes, compartments, populationByNuts } = useContext ( DataContext ) ! ;
3737
3838 const storeSelectedArea = useAppSelector ( ( state ) => state . dataSelection . district ) ;
3939 const selectedCompartment = useAppSelector ( ( state ) => state . dataSelection . compartment ) ;
@@ -130,11 +130,13 @@ export default function MapContainer() {
130130 const compartmentName = tBackend (
131131 `infection-states.${ compartments ?. find ( ( c ) => c . id === selectedCompartment ) ?. name } `
132132 ) ;
133+ const population = populationByNuts ?. [ String ( regionData ?. RS ) ] as number | undefined ;
134+ const populationLine = population ? `${ t ( 'heatlegend.population' ) } : ${ formatNumber ( population ) } ` : '' ;
133135 return selectedScenario !== null && selectedCompartment
134- ? `${ bez } {GEN}\n${ compartmentName } : ${ formatNumber ( Number ( regionData ?. value ) ) } `
135- : `${ bez } {GEN}` ;
136+ ? `${ bez } {GEN}\n${ populationLine } \n ${ compartmentName } : ${ formatNumber ( Number ( regionData ?. value ) ) } `
137+ : `${ bez } {GEN}${ populationLine } ` ;
136138 } ,
137- [ compartments , formatNumber , selectedCompartment , selectedScenario , t , tBackend ]
139+ [ compartments , formatNumber , populationByNuts , selectedCompartment , selectedScenario , t , tBackend ]
138140 ) ;
139141
140142 const calculateToolTipFetching = useCallback (
0 commit comments