File tree Expand file tree Collapse file tree 3 files changed +9
-3
lines changed
pages/AccountLiveLocation/components Expand file tree Collapse file tree 3 files changed +9
-3
lines changed Original file line number Diff line number Diff line change @@ -55,6 +55,7 @@ if (process.env.REACT_APP_PUBLISHABLE_KEY) {
5555 } }
5656 >
5757 < LiveView
58+ onDeviceClick = { console . log }
5859 navigateOnClick = { false }
5960 publishableKey = { process . env . REACT_APP_PUBLISHABLE_KEY }
6061 showTooltips = { false }
Original file line number Diff line number Diff line change @@ -17,7 +17,9 @@ export const customPopup = (
1717 name ,
1818 timezone ,
1919 reversedCoordinates ,
20- notActivePayload
20+ notActivePayload ,
21+ activePayload ,
22+ disconnectedPayload
2123) => {
2224 return (
2325 < div className = "accountLiveLocationPopupBody" >
@@ -44,7 +46,7 @@ export const customPopup = (
4446 < td className = "popupTableRowHeader" > Activity</ td >
4547 < td className = "emptyCell" />
4648 < td className = "popupTableRowContent" >
47- { device_status . active ? device_status . active . activity : 'unknown' }
49+ { activePayload ? activePayload . activity : 'unknown' }
4850 </ td >
4951 </ tr >
5052 < tr className = "popupTableRow" >
Original file line number Diff line number Diff line change @@ -170,6 +170,7 @@ const Map = props => {
170170 }
171171
172172 const bindPopup = ( leafletMarker , deviceData ) => {
173+ leafletMarker . unbindPopup ( )
173174 const popup = Leaflet . popup ( )
174175 leafletMarker . on ( 'move' , function ( ) {
175176 try {
@@ -187,7 +188,9 @@ const Map = props => {
187188 deviceData . name ,
188189 deviceData . timezone ,
189190 deviceData . location . geometry . coordinates ,
190- deviceData . inactive
191+ deviceData . inactive ,
192+ deviceData . active ,
193+ deviceData . disconnected
191194 )
192195 )
193196 )
You can’t perform that action at this time.
0 commit comments