handleMouseEnter(alert.geography_code)}
- onMouseLeave={handleMouseLeave}
- onClick={(evt) => {
- evt.preventDefault()
- evt.stopPropagation()
- handleClick(alert.geography_code)
- }}
- />
- ))}
+ {groupedAlerts.map(({ status, alerts }) => {
+ if (alerts.length > 0) {
+ return (
+ <>
+
+
+ {status == 'Green' ? t('map.no-alert') : t('map.alert', { level: status })}
+
+
+ {alerts.map((alert) => (
+ handleMouseEnter(alert.geography_code)}
+ onMouseLeave={handleMouseLeave}
+ onClick={(evt) => {
+ evt.preventDefault()
+ evt.stopPropagation()
+ handleClick(alert.geography_code)
+ }}
+ />
+ ))}
+ >
+ )
+ }
+ })}