@@ -14,7 +14,7 @@ See the License for the specific language governing permissions and
14
14
limitations under the License.
15
15
*/
16
16
17
- import React , { useState , useEffect } from 'react' ;
17
+ import React , { useState , useEffect , useContext } from 'react' ;
18
18
import {
19
19
Beacon ,
20
20
Room ,
@@ -136,7 +136,8 @@ const BeaconViewDialog: React.FC<IProps> = ({
136
136
id = 'mx_BeaconViewDialog'
137
137
bounds = { bounds }
138
138
centerGeoUri = { centerGeoUri }
139
- interactiveonError = { setMapDisplayError }
139
+ interactive
140
+ onError = { setMapDisplayError }
140
141
className = "mx_BeaconViewDialog_map"
141
142
>
142
143
{
@@ -152,26 +153,25 @@ const BeaconViewDialog: React.FC<IProps> = ({
152
153
</ >
153
154
}
154
155
</ Map > }
155
- { mapDisplayError &&
156
- < MapError
157
- error = { mapDisplayError . message as LocationShareError }
158
- isMinimised
159
- />
160
- }
161
- { ! centerGeoUri && ! mapDisplayError && < MapFallback
162
- data-test-id = 'beacon-view-dialog-map-fallback'
163
- className = 'mx_BeaconViewDialog_map'
164
- >
165
- < span className = 'mx_BeaconViewDialog_mapFallbackMessage' > { _t ( 'No live locations' ) } </ span >
166
- < AccessibleButton
167
- kind = 'primary'
168
- onClick = { onFinished }
169
- data-test-id = 'beacon-view-dialog-fallback-close'
170
- >
171
- { _t ( 'Close' ) }
172
- </ AccessibleButton >
173
- </ MapFallback >
156
+ { mapDisplayError &&
157
+ < MapError
158
+ error = { mapDisplayError . message as LocationShareError }
159
+ isMinimised
160
+ />
174
161
}
162
+ { ! centerGeoUri && ! mapDisplayError && < MapFallback
163
+ data-test-id = 'beacon-view-dialog-map-fallback'
164
+ className = 'mx_BeaconViewDialog_map'
165
+ >
166
+ < span className = 'mx_BeaconViewDialog_mapFallbackMessage' > { _t ( 'No live locations' ) } </ span >
167
+ < AccessibleButton
168
+ kind = 'primary'
169
+ onClick = { onFinished }
170
+ data-test-id = 'beacon-view-dialog-fallback-close'
171
+ >
172
+ { _t ( 'Close' ) }
173
+ </ AccessibleButton >
174
+ </ MapFallback > }
175
175
{ isSidebarOpen ?
176
176
< DialogSidebar beacons = { liveBeacons } onBeaconClick = { onBeaconListItemClick } requestClose = { ( ) => setSidebarOpen ( false ) } /> :
177
177
< AccessibleButton
0 commit comments