From c000fa00d3a4b71a814864b9c805885f85bdd8dc Mon Sep 17 00:00:00 2001 From: Anton Tananaev Date: Mon, 24 Oct 2022 21:50:03 -0700 Subject: Improve map markers --- modern/src/other/EventPage.js | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) (limited to 'modern/src/other/EventPage.js') diff --git a/modern/src/other/EventPage.js b/modern/src/other/EventPage.js index 9da8be79..8adc142c 100644 --- a/modern/src/other/EventPage.js +++ b/modern/src/other/EventPage.js @@ -13,6 +13,7 @@ import MapCamera from '../map/MapCamera'; import MapPositions from '../map/MapPositions'; import MapGeofence from '../map/MapGeofence'; import StatusCard from '../common/components/StatusCard'; +import { formatNotificationTitle } from '../common/util/formatter'; const useStyles = makeStyles(() => ({ root: { @@ -39,6 +40,13 @@ const EventPage = () => { const [position, setPosition] = useState(); const [showCard, setShowCard] = useState(false); + const formatType = (event) => formatNotificationTitle(t, { + type: event.type, + attributes: { + alarms: event.attributes.alarm, + }, + }); + const onMarkerClick = useCallback((positionId) => { setShowCard(!!positionId); }, [setShowCard]); @@ -75,13 +83,13 @@ const EventPage = () => { navigate('/')}> - {t('positionEvent')} + {formatType(event)}
- {position && } + {position && } {position && } {position && showCard && ( -- cgit v1.2.3